AsyncMessenger will select event driver following epoll, kqueue and
select(now not exists) sequence
Fix#9926
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Because some test environments generate spurious
rmxattr operations, allow the client to release
'X' caps. Allows xattr operations to proceed
while still preventing client releasing other caps.
Fixes: #9800
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 5691c68a0a)
Not sure how 'quick' this really is now compared with
the full filesystem instructions, but let's not leave
it incomplete.
Signed-off-by: John Spray <john.spray@redhat.com>
When using export <image-name> <path> and the size of image is more
than 2G, the previous version about finish() could not handle in
seeking the offset in image and return error.
This is caused by the incorrect variable type. Try to use the correct
variable type to fixed it.
I use another variable which type is uint64_t for confirming seeking
and still use the previous r for return error.
uint64_t is more better than type int for handle lseek64().
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
For testing injectargs a configuration option was changed that has side
effects on the cluster. It could introduce random failures later. It is
replaced with a configuration option that cannot have adverse side
effects on the cluster.
http://tracker.ceph.com/issues/9919Fixes: #9919
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Because some test environments generate spurious
rmxattr operations, allow the client to release
'X' caps. Allows xattr operations to proceed
while still preventing client releasing other caps.
Fixes: #9800
Signed-off-by: John Spray <john.spray@redhat.com>
Currently if we enable quota and set max_size = -1, it doesn’t
mean max_size is unlimited as expected. Instead, it means object
with any size is not allowed to upload because of “QuotaExceeded”.
The root cause is the function rgw_rounded_kb which convert max_size
to max_size_kb returns 0 for -1 because it takes an unsigned int
but we pass an int to it. A simple fix is check max_size before
it’s rounded to max_size_kb.
Test case:
1 enable and set quota:
radosgw-admin quota enable --uid={user_id} --quota-scope=user
radosgw-admin quota set --quota-scope=user --uid={user_id}\
--max-objects=100 --max-size=-1
2 upload any object with non-zero length
it will return 403 with “QuotaExceeded” and return 200 if you apply the fix.
Fixes: #9907
Backport: giant, firefly
Signed-off-by: Dong Lei leidong@yahoo-inc.com
m->get_client_tid() is 64 bits (as it should be), but Inode::flushing_cap_tid
is only 16 bits. 16 bits should be plenty to let the cap flush updates
pipeline appropriately, but we need to cast in the proper direction when
comparing these differently-sized versions. So downcast the 64-bit one
to 16 bits.
Fixes: #9869
Backport: giant, firefly, dumpling
Signed-off-by: Greg Farnum <greg@inktank.com>
Current code marks a directory inode as complete and ordered when readdir
finishes, but it does not check if the directory was modified in the middle
of readdir. This is wrong, directory inode should not be marked as ordered
if it was modified during readddir
The fix is introduce a new counter to the inode data struct, we increase
the counter each time the directory is modified. When readdir finishes, we
check the counter to decide if the directory should be marked as ordered.
Fixes: #9894
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Fix indentation to the same as the original fsx.c .
Fix for Coverity issue:
CID 1219473 (#1-2 of 2): Nesting level does not match indentation
(NESTING_INDENT_MISMATCH)
uncle: This statement is indented to column 25, as if it were
nested within the preceding parent statement, but it is not.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix memory leak caused by using std::string to hold result
of strdup call returned from getObjName().
Fix for Coverity issues:
CID 1221525 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Failing to save or free storage allocated by
this->getObjName(soid, 0UL) leaks it.
CID 1221526 (1-3 of 3): Resource leak (RESOURCE_LEAK)
leaked_storage: Failing to save or free storage allocated by
this->getObjName(soid, *) leaks it.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix handling of realloc. If realloc() fails it returns NULL, assigning
the return value of realloc() directly to the pointer without checking
for the result will lead to a memory leak in error case.
Use a temporary pointer to hold the result of realloc(). In error case
print error and exit, otherwise assign it to the pointer we want to realloc.
Fix also error checks for malloc to fail as soon as malloc fails and
don't try to run realloc again after failed malloc.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for:
CID 1128384 (#1 of 1): Ignoring number of bytes read (CHECKED_RETURN)
check_return: fread(void * restrict, size_t, size_t, FILE * restrict)
returns the number of bytes read, but it is ignored.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for:
CID 1054853 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking is_truncated suggests that it may
be null, but it has already been dereferenced on all paths leading
to the check.
Add vim line to file.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Check return value as done in all other places. Fix error messages
to print correct function name getdir and not read_dir/readdir since
the error isn't necessarily raised by read_dir().
Fix for:
CID 1219463 (#1 of 1): Unchecked return value (CHECKED_RETURN)
check_return: Calling getdir without checking return value (as
is done elsewhere 4 out of 5 times).
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for:
[src/test/test_rbd_replay.cc:193]: (portability) Passing NULL after the
last typed argument to a variadic function leads to undefined behaviour.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
The convert() call is changing data. To prevent Heisenbugs
depending in NDEBUG definition (e.g. if debug is off).
Move convert() call out of the assert call and use assert
only on the result value of the call.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>