| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new configuration option worm-files-deletable to
file-level Worm in order to control behaviour of Worm files upon deletion.
Steps to Test:
1. Add all the configuration options to a volume to activate file-level-worm
2. Option features.worm-files-deletable is set to 1 by default.
3. Create a new file and wait for the retention time to expire.
4. After retention time expires, do an truncate, rename, unlink, link
or write to send the file in Worm state.
5. After that do `rm -f filename`.
6. The file is successfully removed.
7. Repeat from step 2 by setting features.worm-files-deletable 0.
This time deletion should not be successful.
Change-Id: Ibc89861ee296e065330b93a9f9606be5da40af31
BUG: 1508898
Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
issue: Calling "mq_inode_ctx_get" without checking return value
function: marker_rename_unwind
fix: typecasted the return value of function to void
Change-Id: I552b1d76df434dfc3d9c2273ec63ccc4b9f960f2
BUG: 789278
Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem : Overwritting the value of ret in extract_db_params.
Fix : The value is used in out.
Change-Id: Ib7bee999c6f19e0c83ef47deab61835977162bd5
BUG: 789278
Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Add new fields used by GD2 to the upcall xlator options.
Updates #302
Change-Id: Ia684648aa06312ca9649f00af17575162adb4996
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
|
|
|
|
|
|
|
| |
Updates: #302
Change-Id: Ib401eb6fa187ab2498de8b5cdf4686e388192208
Signed-off-by: hari gowtham <hgowtham@redhat.com>
|
|
|
|
|
|
|
| |
Updates: #302
Change-Id: Ibbf0f99d4b81a5e9a5ccee1889214b74f083a7db
Signed-off-by: Aravinda VK <avishwan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
With https://review.gluster.org/18059 introducing new fields into the
volume_option structure, this change takes care of the changes required
at the barrier side.
Updates #302
Change-Id: If991df10b130c762a44883668a00e49943a508f8
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
| |
Updates #302
Change-Id: I320eabf0c83295e90a312316a8373ccf5bf91dc4
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
| |
watchlists should not over-write values gathered in previous invocation.
Change-Id: I5634930d20e720ad6509b03a64360d7320800565
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Structured logging infra is available in logging library with
issue #240. Log messages with dynamic content are identified and
converted to structured logging format(`gf_msg` to `gf_smsg` and
`gf_log` to `gf_slog`)
BUG: 1501054
Change-Id: I5fccc354730c07cb9ae444d0b959d1d72bd9be49
Signed-off-by: Aravinda VK <avishwan@redhat.com>
|
|
|
|
|
|
|
|
| |
Replaced strcpy, strcat with strncpy, strncat calls.
Change-Id: Ibf46a2b5ae4a0dd1632be46d6fe3597f6ace7a41
BUG: 789278
Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Error: DEADCODE:
xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:524:
dead_error_begin: Execution cannot reach this statement: "default:".
Error: DEADCODE:
xlators/features/changelog/lib/src/gf-history-changelog.c:984:
dead_error_line: Execution cannot reach the expression "to" inside
this statement: "if (!from || !to)
ret = -1;".
Error: REVERSE_INULL:
xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:678:
check_after_deref: Null-checking "entry" suggests that it may be null,
but it has already been dereferenced on all paths leading to the
check.
Error: STACK_USE:
xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:275:
stack_use_local_overflow: Local variable "ascii" uses 12288 bytes of
stack space, which exceeds the maximum single use of 10000 bytes.
Error: STACK_USE:
xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:167:
stack_use_local_overflow: Local variable "ascii" uses 12288 bytes of
stack space, which exceeds the maximum single use of 10000 bytes.
Error: STRING_NULL:
xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:589:9:
string_null_sink_parm_call: Passing parameter "from_path" to "open"
which expects a null-terminated string.
Error: UNUSED_VALUE:
xlators/features/changelog/lib/src/gf-history-changelog.c:628:
assigned_value: Assigning value "-1" to "ret" here, but that stored
value is overwritten before it can be used.
Error: STRING_NULL:
xlators/features/changelog/lib/src/gf-history-changelog.c:518:
string_null_argument: Function "sys_pread" does not terminate string
"*ccd->changelog".
BUG: 789278
Change-Id: I1414ec6d4a118ce0c14df4dbe50995c85fe3ecf7
Signed-off-by: Aravinda VK <avishwan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. br_update_scrub_finish_time: BUFFER_SIZE_WARNING
2. br_read_bad_object_dir : DEADCODE
3. bit-rot.c: init : RESOURCE_LEAK
4. br_stub_fsetxattr : STACK_USE
5. br_stub_setxattr : STACK_USE
6. bit-rot-stub.c: init : BUFFER_SIZE_WARNING
Change-Id: Ie620f431bd7548fedae2152aa756ccdcd89ddf89
Signed-off-by: Kotresh HR <khiremat@redhat.com>
BUG: 789278
|
|
|
|
|
|
|
|
|
|
|
| |
Structured logging infra is available in logging library with
issue #240. Log messages with dynamic content are identified and
converted to structured logging format(`gf_msg` to `gf_smsg` and
`gf_log` to `gf_slog`)
BUG: 1501054
Change-Id: I99b35396455a634f5267eb1379d481ea981e5494
Signed-off-by: Aravinda VK <avishwan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity ID: 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
418, 419, 423, 424, 425, 426, 427, 428, 429, 436, 437, 438, 439,
440, 441, 442, 443
Issue: Event include_recursion
Removed redundant, recursive includes from the files.
Change-Id: I920776b1fa089a2d4917ca722d0075a9239911a7
BUG: 789278
Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
|
|
|
|
|
|
|
|
| |
This patch fixes coverity issues 242 and 453.
Change-Id: If18f40539dccc7c2fcdcf8ef9b6fa3efbb3e462f
BUG: 789278
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
|
| |
If condition to check error in lseek wrapper sys_lseek.
Change-Id: Ic96ddbb0898146bbfae11acc86818d6604e5eb98
BUG: 789278
Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Coverity ID: 259
Coverity ID: 163
Change-Id: I7f7753b870715e1176826fb8dfbe81119750d113
BUG: 789278
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Ensure that the fop program is the first in the program list
so that there's minimum amount of time spent to search the
program for the most frequently needed use case.
Change-Id: I45c3dcdbf39ec90ba39d914432d13a2ace00a5ee
BUG: 1509647
Signed-off-by: Milind Changire <mchangir@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
worm_truncate,worm_ftruncate,worm_link,worn_unlink and worm_rename.
Issue :Event negative_returns: "op_errno" is passed to a parameter
that cannot be negative.
Fix : In functions worm_link,worm_unlink,worm_truncate,worm_ftruncate
and worm_rename, added an condition to check the whether value
of "op_errno" is negative or not.If the value is negative, then
it is set to EROFS.
Change-Id: Ie65601b6cc9799f587cc574408281dab50a58afb
BUG: 789278
Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue:
A new file is appendable even when file level worm is 1.
Fix:
Do a state transition in writev function in worm.c file.
Steps To Test:
1- Activate file level worm.
2- Create a new file.
3- Leave file dormant for auto commit period.
4- Try and append some content to the file.
5- check the file if new content has been appended or not.
6- check if file has been transitioned to Worm Retention state.
Change-Id: I52d50ad888cb0c39ad54be9352ccb07d48b8d71a
BUG: 1505807
Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
If pthread_attr_init fails, gf_msg uses this->name
where 'this' is not initialized yet. This patch fixes
the same.
Change-Id: Ie004cbe1015a0d62fc3b5512e8954c5606eeeb5f
Signed-off-by: Kotresh HR <khiremat@redhat.com>
BUG: 1505325
|
|
|
|
|
|
| |
BUG: 1193929
Change-Id: Ibfee382362826556e2e760f9b946c83445d6a08e
Signed-off-by: Prashanth Pai <ppai@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting in Fedora 26 which has gcc-7.1.x, -Wformat-trunction is enabled
with -Wformat, resulting in a flood of new warnings. This many warnings
is a concern because it makes it hard(er) to see other warnings that
should be addressed.
An example is at
https://kojipkgs.fedoraproject.org//packages/glusterfs/3.12.0/1.fc28/data/logs/x86_64/build.log
For more info see https://review.gluster.org/#/c/18267/
Change-Id: I7792d94da1e8109f3aaa857a94be40f2d2402684
BUG: 1492851
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The headerfile globals.h is recursively adding itself.
( globals.h -> xlator.h -> stack.h -> globals.h).
We are finding the source files which are including the header
file globals.h and removing the inclusion line.
I used git grep -l stack.h | xargs git grep globals.h --
to find out the files and removed the header file from all files
except libglusterfs/src/xlator.h and libglusterfs/src/Makefile.am
When I try to remove header file from libglusterfs/src/xlator.h
I'm getting some errors. In libglusterfs/src/Makefile.am it is
required for building RPMs.
Change-Id: I537218c09ade6d7ea51717768b26563a247daf60
BUG: 789278
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
grant_blocked_locks() constructs flock from lock. Locks xlator uses
frame->root->pid interchangeably flock->l_pid. With gNFS frame->root->pid
(which translates to lock->client_pid) is not same as flock->l_pid, this leads
to lk's cbk returning flock with l_pid from lock->client_pid instead of input
flock->l_pid. This triggers EC's error code path leading to failure of lk call,
because the response' flock->l_pid is different from request's flock->l_pid.
Fix:
Maintain separation of lock->client_pid, flock->l_pid. Always unwind with
flock with correct pid.
BUG: 1472961
Change-Id: Ifab35c458662cf0082b902f37782f8c5321d823d
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Since rename didn't check if newloc exists and it's
retention state it was possible to rename a new file that wasn't
in retention over a existing file that was in read-only state.
Change-Id: I63c6bbabb7bb456ebedf201cc77b878ffda62229
BUG: 1484490
Signed-off-by: luneo7 <luneo7@gmail.com>
Reviewed-on: https://review.gluster.org/18104
Tested-by: jiffin tony Thottan <jthottan@redhat.com>
Tested-by: Prashanth Pai <ppai@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Karthik U S <ksubrahm@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Change-Id: I55fa87e07136cff10b0d725ee24dd3151016e64e
BUG: 1489823
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/18243
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: Sunil Kumar Acharya <sheggodu@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Because create_count/eexist_count are incremented without locks, all the shards may not
be created because call_count will be lesser than what it needs to be. This can lead
to crash in shard_common_inode_write_do() because inode on which we want to do
fd_anonymous() is NULL
Fix:
Increment the counts in frame->lock
Change-Id: Ibc87dcb1021e9f4ac2929f662da07aa7662ab0d6
BUG: 1488354
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://review.gluster.org/18203
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
|
|
|
|
|
|
|
| |
Change-Id: I42df7679d63fec9b4c03b8dbc66c5625f097fac0
BUG: 1488546
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/18209
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AFR marks the arbiter as 'non readable'. This has been introduced with
commit 8ab87137 (afr: do not set arbiter as a readable subvol in inode
context). arbiter_readv() should not get called anymore, so it could be
removed. However, it is a good defensive approach to have all the inode
read FOPs that can not be handled by the arbiter to return ENOSYS.
Change-Id: I6ea41680832859bd6790dc8d7440ee98d38205fc
BUG: 1484722
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: https://review.gluster.org/18103
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glusterd shouldn't concern itself with creating directories specific to
certain xlators.
The index xlator will now proceed creating './glusterfs/indices' dir
only if the parent '.glusterfs' directory exists, which still fixes the
original problem reported i.e 'volume start force' command shouldn't
create brick path if it doesn't exist (BUG 1457202)
This reverts most of the changes done by the commit
b58a15948fb3fc37b6c0b70171482f50ed957f42
Change-Id: I7fc52ad64dce220e336c218fb4d85933ca2e61c0
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: https://review.gluster.org/18003
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When parent inode is not looked up before, the inode type
won't be set. In this scenario we should send the lookup
to the normal graph first.
Change-Id: I5d3e53f5c1c33a17be32204f3114749d9b1e6db8
BUG: 1480591
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: https://review.gluster.org/18028
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...in file/dir creation and lookup codepaths. The check is relaxed for
fops coming from trash xlator at the moment until trash has client side
logic to send the create fops with gfid-req.
Also fixed the missing trash pid assignment in creates sent by trash
xlator. Without this, truncated files won't be moved to .trashcan.
Change-Id: Ieddd7f0634850e7c7010e4fbb4ad1eead35888c8
BUG: 1478297
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: https://review.gluster.org/17975
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue:
The caller of glfs_setxattr sends a buffer to set as the value.
We create a dict in which the pointer to the value is set.
Underlying layers like md-cache take a ref on this dict to store
the value for a longer time. But the moment setxattr is complete,
the caller of glfs_setxattr can free the value memory.
Solution:
memcpy the setxattr value to the gluster buffer.
Change-Id: I58753fe702e8b7d0f6c4f058714c65d0ad5d7a0a
BUG: 1477488
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: https://review.gluster.org/17967
Reviewed-by: soumya k <skoduri@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PROBLEM STATEMENT: read-only should block fallocate call if its enabled,
else pass to next xlator. Implemented this functionality in read-only.
BUG: 1475300
Change-Id: I57c51eb4f1519ba75d7291eba49554e6ed4a25eb
Signed-off-by: SonaArora <aarorasona@gmail.com>
Reviewed-on: https://review.gluster.org/17879
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: Karthik U S <ksubrahm@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Karthik U S <ksubrahm@redhat.com>
Reviewed-by: Ashish Pandey <aspandey@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With recent changes to the mem-pool initialization,
mem_pools_init_early() and mem_pools_init_late() need to be called
before mem_get() is usable.
This change has been tested manually with the included test from
xlators/features/changelog/lib/examples/c/get-changes.c.
Change-Id: I139563c4ff78a566cef2ff7e3da2ee10306def92
BUG: 1475255
Reported-by: Kotresh HR <khiremat@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://review.gluster.org/17900
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Sometime brick process is getting crash in notify function at the
time of cleanup db connection while brick mux is enabled.
Solution: In changetimerrecorder (ctr) notify function after cleanup
db connection set to db_conn to NULL to avoid reuse the same
db connection again.
Note: Below is the backtrace pattern showing by brick process
#0 0x00007ff98a30c1f7 in raise () from /lib64/libc.so.6
#1 0x00007ff98a30d8e8 in abort () from /lib64/libc.so.6
#2 0x00007ff98a34bf47 in __libc_message () from /lib64/libc.so.6
#3 0x00007ff98a351b54 in malloc_printerr () from /lib64/libc.so.6
#4 0x00007ff98a3537aa in _int_free () from /lib64/libc.so.6
#5 0x00007ff97d95e311 in gf_sql_connection_fini (sql_connection=sql_connection@entry=0x7ff8e8496b50) at gfdb_sqlite3.c:42
#6 0x00007ff97d95e38a in gf_sqlite3_fini (db_conn=0x7ff92ca04470) at gfdb_sqlite3.c:507
#7 0x00007ff97d957156 in fini_db (_conn_node=0x7ff92ca04470) at gfdb_data_store.c:326
#8 0x00007ff97db78679 in notify (this=0x7ff92c5b3670, event=9, data=0x7ff92c5b5a00) at changetimerecorder.c:2178
#9 0x00007ff98bca0dc2 in xlator_notify (xl=0x7ff92c5b3670, event=event@entry=9, data=data@entry=0x7ff92c5b5a00) at xlator.c:549
#10 0x00007ff98bd3ac12 in default_notify (this=this@entry=0x7ff92c5b5a00, event=9, data=data@entry=0x7ff92c5b6d50) at defaults.c:3139
BUG: 1475632
Change-Id: Idd4bfdb4629c4799ac477ade81228065212683fb
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Reviewed-on: https://review.gluster.org/17888
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libgfchangelog was encoding path using spec rfc3986, but encoding only
required for SPACE and NEWLINE chars since the NEWLINE char is used as
record separator and SPACE as field separator in the parsed changelogs
output.
Changed the encoding function to encode only SPACE and NEWLINE.
BUG: 1451724
Change-Id: I4305459aab9e710517dd3eb065f0024503064b77
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: https://review.gluster.org/17674
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set names to threads on creation for easier
debugging.
Output of top -H -p <PID-OF-GLUSTERFSD>
Before:
19773 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19774 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19775 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19776 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19777 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19778 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19779 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19780 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19781 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19782 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19783 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19784 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19785 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.01 glusterfsd
19786 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.01 glusterfsd
19787 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.01 glusterfsd
19789 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19790 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
25178 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
5398 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
7881 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
After:
19773 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19774 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glustertimer
19775 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterfsd
19776 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glustermemsweep
19777 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glustersproc0
19778 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glustersproc1
19779 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterepoll0
19780 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusteridxwrker
19781 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusteriotwr0
19782 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterbrssign
19783 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterbrswrker
19784 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterclogecon
19785 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.01 glusterclogd0
19786 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.01 glusterclogd1
19787 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.01 glusterclogd2
19789 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterposixjan
19790 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterposixfsy
25178 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterepoll1
5398 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterepoll2
7881 root 20 0 1301.3m 12.6m 8.4m S 0.0 0.1 0:00.00 glusterposixhc
Change-Id: Id5f333755c1ba168a2ffaa4fce6e71c375e10703
BUG: 1254002
Updates: #271
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: https://review.gluster.org/11926
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
0 0x00007f1482f1f1d7 in raise () from /lib64/libc.so.6
1 0x00007f1482f208c8 in abort () from /lib64/libc.so.6
2 0x00007f1482f18146 in __assert_fail_base () from /lib64/libc.so.6
3 0x00007f1482f181f2 in __assert_fail () from /lib64/libc.so.6
4 0x00007f148484986a in __inode_link (inode=inode@entry=0x7f14742404d4,
parent=parent@entry=0x7f14742404d4,
name=name@entry=0x7f1460001c48 "testfile5308",
iatt=iatt@entry=0x7f1460001bc8) at inode.c:954
5 0x00007f1484849969 in inode_link (inode=0x7f14742404d4,
parent=parent@entry=0x7f14742404d4,
name=name@entry=0x7f1460001c48 "testfile5308",
iatt=iatt@entry=0x7f1460001bc8) at inode.c:1060
6 0x00007f147591b895 in quota_build_ancestry_cbk (
frame=frame@entry=0x7f1482315e80, cookie=<optimized out>,
this=0x7f147000e910, op_ret=op_ret@entry=6904, op_errno=op_errno@entry=0,
entries=entries@entry=0x7f1474731c00, xdata=xdata@entry=0x0) at quota.c:779
7 0x00007f1475b2f505 in marker_build_ancestry_cbk (frame=0x7f1482315988,
cookie=<optimized out>, this=<optimized out>, op_ret=<optimized out>,
op_errno=<optimized out>, entries=0x7f1474731c00, xdata=0x0)
at marker.c:3055
8 0x00007f14848b9cd9 in default_readdirp_cbk (
frame=frame@entry=0x7f1482315b30, cookie=<optimized out>,
this=<optimized out>, op_ret=op_ret@entry=6904, op_errno=op_errno@entry=0,
entries=entries@entry=0x7f1474731c00, xdata=xdata@entry=0x0)
at defaults.c:1403
9 0x00007f1475f68132 in pl_readdirp_cbk (frame=0x7f1482315dac,
cookie=<optimized out>, this=<optimized out>, op_ret=6904, op_errno=0,
entries=0x7f1474731c00, xdata=0x0) at posix.c:2700
10 0x00007f1476e26819 in posix_readdirp (frame=0x7f1482315f54,
this=<optimized out>, fd=<optimized out>, size=<optimized out>,
off=<optimized out>, dict=<optimized out>) at posix.c:6282
11 0x00007f1475f6599a in pl_readdirp (frame=0x7f1482315dac,
this=0x7f147000a200, fd=0x7f1484b5106c, size=0, offset=0,
xdata=0x7f1481ab4f34) at posix.c:2711
12 0x00007f14848ce954 in default_readdirp_resume (frame=0x7f1482315b30,
this=0x7f147000b690, fd=0x7f1484b5106c, size=0, off=0,
xdata=0x7f1481ab4f34) at defaults.c:2019
13 0x00007f148485c92d in call_resume (stub=0x7f1481b65710) at call-stub.c:2508
14 0x00007f1475d54743 in iot_worker (data=0x7f147004e7d0) at io-threads.c:210
15 0x00007f148369cdc5 in start_thread () from /lib64/libpthread.so.0
16 0x00007f1482fe173d in clone () from /lib64/libc.so.6
Change-Id: I740dc691e7be1bc2a9ae3a0cb14bbf566ea77bc5
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
Reviewed-on: https://review.gluster.org/17730
Tested-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the "read-only" volume option is set, it would
make the volume "read-only". But it also makes it
read-only to gluster internal clients such as
gsyncd, self heal, bitd, rebalance etc. In which
case, all the internal operations would fail. This
patch allows internal clients to read and write
when "read-only" option is set.
Change-Id: I8110e8d9eac8def403bb29f235000ddc79eaa433
BUG: 1430608
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: https://review.gluster.org/16855
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Karthik U S <ksubrahm@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we were taking unref on wrong dictionary which results
in wrong memory access.
Change-Id: Ic25a6c209ecd72c9056dfcb79fabcfc650dd3c1e
BUG: 1467513
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: https://review.gluster.org/17691
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
.snaps directory is a virtual direcotory, that doesn't
exist on the backend. Even though it is a special dentry,
it doesn't have a dedicated inode. So the inode number is
always random. Which means it will get different inode
number when reboot happens on snapd process.
Now with windows client the show-direcotry feature requires
a lookup on the .snpas direcoty post readdirp on root.
If the snapd restarted after a lookup, then subsequent lookup
will fail, because linked inode will be stale.
This patch will do a revalidate lookup with a new inode.
Change-Id: If97c07ecb307cefe7c86be8ebd05e28cbf678d1f
BUG: 1467513
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: https://review.gluster.org/17690
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
protocol/server expects a child up event to successfully
configure the graph. In the actual brick graph, posix is
the one who decide to initiate the notification to the parent
that the child is up.
But in snapd graph there is no posix, hence the child up
notification was missing.
Ideally each xlator should initiate the child up event whenever
it see's that this is the last child xlator.
Change-Id: Icccdb9fe920c265cadaf9f91c040a0831b4b78fc
BUG: 1467513
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: https://review.gluster.org/17689
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Plus minor readability improvements.
Reported-by: pmatthaei@debian.org
Change-Id: I5393819a2fc9f240a19811143bb57b127df717cf
BUG: 1466785
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/17660
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When external programs perform a dlopen("..so", RTLD_LAZY|RTLD_LOCAL)
on some shared objects like xlators, it can fail with dlerror set to
error string "undefined symbol <some-type>".
This was observed for the following shared objects: fuse.so, quota.so,
quotad.so, server.so, libgfrpc.so and socket.so
P.S: This was found while running a go program which fetches the list
of xlator options (volume_option_t) from xlator's shared object.
BUG: 1193929
Change-Id: I7b958409cf11fb67c2be32a3f85a96fb1260236b
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: https://review.gluster.org/17659
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The most common pattern, both in our code and elsewhere, is this:
struct _xyz {
...
};
typedef struct _xyz xyz_t;
These exceptions - especially call_frame/call_stack - have been slowing
down code navigation for years. By converging on a single pattern,
navigating from xyz_t in code to the actual definition of struct _xyz
(i.e. without having to visit the typedef first) might even be
automatable.
Change-Id: I0e5dd1f51f98e000173c62ef4ddc5b21d9ec44ed
Signed-off-by: Jeff Darcy <jdarcy@fb.com>
Reviewed-on: https://review.gluster.org/17650
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: Jeff Darcy <jeff@pl.atyp.us>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
There is a race when the following two commands are executed on the mount in
parallel from two different terminals on a sharded volume,
which leads to use-after-free.
Terminal-1:
while true; do dd if=/dev/zero of=file1 bs=1M count=4; done
Terminal-2:
while true; do cat file1 > /dev/null; done
In the normal case this is the life-cycle of a shard-inode
1) Shard is added to LRU when it is first looked-up
2) For every operation on the shard it is moved up in LRU
3) When "unlink of the shard"/"LRU limit is hit" happens it is removed from LRU
But we are seeing a race where the inode stays in Shard LRU even after it is
forgotten which leads to Use-after-free and then some memory-corruptions.
These are the steps:
1) Shard is added to LRU when it is first looked-up
2) For every operation on the shard it is moved up in LRU
Reader-handler Truncate-handler
1) Reader handler needs shard-x to be read. 1) Truncate has just deleted shard-x
2) In shard_common_resolve_shards(), it does
inode_resolve() and that leads to
a hit in LRU, so it is going to call
__shard_update_shards_inode_list() to move the
inode to top of LRU
2) shard-x gets unlinked from the itable
and inode_forget(inode, 0) is called
to make sure the inode can be purged
upon last unref
3) when __shard_update_shards_inode_list() is
called it finds that the inode is not in LRU
so it adds it back to the LRU-list
Both these operations complete and call inode_unref(shard-x) which leads to the inode
getting freed and forgotten, even when it is in Shard LRU list. When more inodes are
added to LRU, use-after-free will happen and it leads to undefined behaviors.
Fix:
I see that the inode can be removed from LRU even by the protocol layers like gfapi/gNFS
when LRU limit is reached. So it is better to add a check in shard_forget() to remove itself
from LRU list if it exists.
BUG: 1466037
Change-Id: Ia79c0c5c9d5febc56c41ddb12b5daf03e5281638
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://review.gluster.org/17644
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The buffer used to hold the basename was hard coded
to the size of NAME_MAX(255). It might lead to buffer
overflow crashes when the basename which is sent
is more than NAME_MAX length. Fixed the same.
Change-Id: I6c1cad3ccaeb8c55549b1d3c5f96a198f65ba2b7
BUG: 1463178
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: https://review.gluster.org/17579
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
|