Commit Graph

36920 Commits

Author SHA1 Message Date
Haomai Wang
ce6f22d698 AsyncMessenger: Add kqueue support
AsyncMessenger will select event driver following epoll, kqueue and
select(now not exists) sequence

Fix #9926
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-10-30 01:15:33 +08:00
John Spray
5a4c3aa5c9 client: allow xattr caps in inject_release_failure
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)
2014-10-29 11:09:55 +00:00
John Spray
214ac9fb06 doc: include 'fs new' stuff in cephfs quickstart
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>
2014-10-29 11:02:19 +00:00
Xinze Chi
1fef4c3d54 Get the currently atime of the object in cache pool for eviction
Because if there are mutiple atime in agent_state for the same object, we should use the recently one.

Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
2014-10-29 07:11:11 +00:00
Loic Dachary
66b4cd9d2c tests: fix signed/unsigned warning
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-29 08:09:33 +01:00
Vicente Cheng
4b87a81c86 rbd: Fix the rbd export when image size more than 2G
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>
2014-10-29 12:21:11 +08:00
Zhiqiang Wang
ef1980f528 osd: tiering: calculate object age during eviction when there is no hit
set

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
2014-10-29 10:59:09 +08:00
Sage Weil
5c051f5c0c Merge pull request #2823 from dachary/wip-9919-injectargs-side-effects
qa: avoid qa/workunits/cephtool/test.sh unstability

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-28 17:03:17 -07:00
Loic Dachary
6fca23f610 qa: avoid qa/workunits/cephtool/test.sh unstability
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/9919 Fixes: #9919

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-28 22:23:11 +01:00
Josh Durgin
548dfa5f02 Merge remote-tracking branch 'origin/giant' 2014-10-28 13:10:52 -07:00
Josh Durgin
5d74c8101c Merge remote-tracking branch 'origin/wip-9806-giant' into giant
Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-10-28 13:09:06 -07:00
John Spray
54abbc61fd Merge pull request #2809 from ceph/wip-9800
client: allow xattr caps in inject_release_failure

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-10-28 12:29:29 +00:00
John Spray
5691c68a0a client: allow xattr caps in inject_release_failure
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>
2014-10-28 11:40:42 +00:00
Loic Dachary
aa640840dc Merge pull request #2818 from hjwsm1989/master
Fix the match error when starting OSD daemons.

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-10-28 08:28:17 +01:00
huangjun
59507101a0 Fix the match error when starting OSD daemons.
If we have osd.7 and osd.77 on the same host, osd.7 will not be mounted if
  osd.77 is mounted.
  Signed-off-by: huangjun <hjwsm1989@gmail.com>
2014-10-28 15:09:28 +08:00
Lei Dong
abd3fd3ef9 fix can not disable max_size quota
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
2014-10-28 11:18:35 +08:00
Sage Weil
9fbfb3919f Merge pull request #2815 from wonzhq/evict-atime
osd: cache tiering: fix the atime logic of the eviction

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-27 19:44:37 -07:00
Zhiqiang Wang
622c5ac417 osd: cache tiering: fix the atime logic of the eviction
Reported-by: Xinze Chi <xmdxcxz@gmail.com>
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
2014-10-28 09:37:11 +08:00
Yan, Zheng
35a387a4bb Merge pull request #2786 from ceph/wip-9869
client: cast m->get_client_tid() to compare to 16-bit Inode::flushing_cap_tid
2014-10-27 18:32:14 -07:00
Greg Farnum
a5184cf46a client: cast m->get_client_tid() to compare to 16-bit Inode::flushing_cap_tid
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>
2014-10-27 16:19:13 -07:00
Yan, Zheng
a4caed8a53 client: fix I_COMPLETE_ORDERED checking
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>
2014-10-27 15:27:37 -07:00
Sage Weil
387d5d8275 init-ceph: make ./init-ceph behave from src dir on systemd
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-27 15:02:18 -07:00
Danny Al-Gaaf
10382d1b8e Merge pull request #2802 from dachary/wip-mailmap
mailmap: Federico Gimenez affiliation

Reviewed-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-27 22:53:07 +01:00
Sage Weil
a6357f2f62 unittest_shared_cache: fix build line
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-27 13:37:45 -07:00
Sage Weil
8bc2461b4a Merge remote-tracking branch 'gh/giant'
Conflicts:
	src/test/common/test_shared_cache.cc
2014-10-27 13:33:48 -07:00
Sage Weil
1abb620d9e doc/release-notes: giant notes
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-27 13:29:12 -07:00
Samuel Just
490ae489ae Merge pull request #2630 from ceph/wip-9545
os/FileStore: do not loop in sync_entry on shutdown

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-10-27 13:20:16 -07:00
Danny Al-Gaaf
6a4380907d rgw_rest_client.cc: remove self assignment of new_info.effective_uri
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2014-10-27 12:58:12 -07:00
Sage Weil
64d3b14f7c Merge branch 'wip-da-SCA-20141025'
Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-27 12:44:34 -07:00
Danny Al-Gaaf
09edada98c test/librbd/fsx.c: fix indentation (NESTING_INDENT_MISMATCH)
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>
2014-10-27 12:44:26 -07:00
Danny Al-Gaaf
c92d47e5c2 libradosstriper/striping.cc: fix strdup memory leaks
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>
2014-10-27 12:44:26 -07:00
Danny Al-Gaaf
be674c5579 test/libradosstriper/striping.cc: fix wrong indentation
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-27 12:44:26 -07:00
Danny Al-Gaaf
4f5d1f48b9 msg/async/Event.cc: use static_cast instead of c-style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-27 12:44:26 -07:00
Danny Al-Gaaf
c952cb9241 rgw/rgw_formats.cc: fix realloc memory leak
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>
2014-10-27 12:44:26 -07:00
Danny Al-Gaaf
1cef8339f7 arch/neon.c: check result of fread()
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>
2014-10-27 12:44:26 -07:00
Danny Al-Gaaf
1bd2abec33 cls_rgw_client.cc: fix potential null pointer deref
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>
2014-10-27 12:44:26 -07:00
Danny Al-Gaaf
56de4caf35 SyntheticClient.cc: check return value of getdir()
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>
2014-10-27 12:44:25 -07:00
Danny Al-Gaaf
6c4a08c1aa SyntheticClient.cc: remove empty lines in if/else blocks
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-27 12:44:25 -07:00
Danny Al-Gaaf
6f614fca62 test_rbd_replay.cc: fix va_list parameter handling
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>
2014-10-27 12:44:25 -07:00
Danny Al-Gaaf
4522a68a2a AsyncConnection.cc: prefer ++operator for non-primitive iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-27 12:44:25 -07:00
Danny Al-Gaaf
0214653baa mon_store_converter.cc: move convert() call out of assert()
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>
2014-10-27 12:44:25 -07:00
Danny Al-Gaaf
2ecd43ba6c test_str_map.cc: remove unused variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-27 12:44:25 -07:00
Danny Al-Gaaf
7f446ea6c1 rgw/rgw_rest_user.cc: reduce scope of key_type
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-27 12:44:25 -07:00
Danny Al-Gaaf
5c7b8c6fab rgw/rgw_rest_swift.cc: use empty() instead of size()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-27 12:44:25 -07:00
Danny Al-Gaaf
17c327fe54 rgw/rgw_rest_s3.cc: use !empty() instead of size() > 0
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-27 12:44:25 -07:00
Sage Weil
1cf9600b0d Merge pull request #2805 from xinxinsh/wip-check-trimmed-pg-log
check to_remove before setting transaction

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-27 11:04:23 -07:00
Sage Weil
fab71f4bcc Merge pull request #2808 from ceph/wip-crush-link-id
mon: fix `osd crush link` id resolution

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-27 11:03:53 -07:00
Sage Weil
ba7943e87e Merge pull request #2589 from majianpeng/bug-fix
Clock: Using clock_gettime instead of gettimeofday in linux os.

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-27 11:02:30 -07:00
Loic Dachary
b17e24c1e5 Merge pull request #2806 from zhouyuan/lrc_dead_code
Remove dead code in EC LRC plugin

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-10-27 17:06:12 +01:00
David Zafman
84a5c8494c vstart.sh: Fix usage
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-10-27 08:35:37 -07:00