Commit Graph

33523 Commits

Author SHA1 Message Date
Sage Weil
2e530771a8 Merge pull request #1788 from ceph/wip-da-sca-20140507
Fix some issues from SCA
2014-05-08 08:47:05 -07:00
Sage Weil
df94b8de57 Merge pull request #1790 from ceph/wip-krbd-fixes
Two minor krbd fixes

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-08 08:33:54 -07:00
Danny Al-Gaaf
569023202b rbd-fuse.c: remove ridiculous linebreak
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-08 17:08:32 +02:00
Danny Al-Gaaf
7a3724b037 rbd-fuse.c: fix indentation
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-08 17:05:48 +02:00
Danny Al-Gaaf
8101f980da rbd-fuse.c: fix -Wmissing-field-initializers
Init image_name with NULL to fix:

rbd_fuse/rbd-fuse.c:57:63: warning: missing field 'image_name' initializer
 [-Wmissing-field-initializers]
 struct rbd_options rbd_options = {"/etc/ceph/ceph.conf", "rbd"};

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-08 16:59:45 +02:00
Ilya Dryomov
65ca867e4f krbd: fix sysfs path in the comment
It's "/sys/bus/rbd/devices/<id>", but libudev works with devices and
not busses, so it's really "/sys/devices/rbd/<id>/".

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-05-08 18:17:48 +04:00
Ilya Dryomov
f1d953e08f krbd: match new with delete, not free()
struct krbd_ctx is allocated with new, use delete to get rid of it.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-05-08 18:17:48 +04:00
Danny Al-Gaaf
082367e8b2 rbd.cc: init 'snap_protected' to fix -Wconditional-uninitialized
Init 'snap_protected' with false to fix:

rbd.cc:544:35: warning: variable 'snap_protected' may be uninitialized
 when used here [-Wconditional-uninitialized]
      f->dump_string("protected", snap_protected ? "true" : "false");
                                  ^~~~~~~~~~~~~~
rbd.cc:482:22: note: initialize the variable 'snap_protected' to silence
 this warning
  bool snap_protected;
                     ^
                      = false

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-08 16:09:07 +02:00
Danny Al-Gaaf
0d01563f8b rbd-fuse.c: init 'rbd' in open_rbd_image()
Init 'rbd' in open_rbd_image() with NULL and add a check for
'rbd' before dereference it to fix:

rbd_fuse/rbd-fuse.c:182:29: warning: variable 'rbd' may be uninitialized
 when used here [-Wconditional-uninitialized]
        int ret = rbd_open(ioctx, rbd->image_name, &(rbd->image), NULL);
                                  ^~~
rbd_fuse/rbd-fuse.c:151:27: note: initialize the variable 'rbd' to silence
 this warning
        struct rbd_openimage *rbd;
                                 ^
                                  = NULL

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-08 16:04:18 +02:00
Danny Al-Gaaf
cfc885fa56 ObjectCacher::_wait_for_write(): init 'bool done'
Init 'bool done' with 'false' to fix:

osdc/Objecter.h:915:27: warning: implicit conversion los: variable 'done'
 may be uninitialized when used here [-Wconditional-uninitialized]
      while (!done)
              ^~~~
osdc/ObjectCacher.cc:1399:14: note: initialize the variable 'done' to
 silence this warning
    bool done;
             ^
              = false

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-08 15:54:24 +02:00
Danny Al-Gaaf
8322878c22 Objecter::calc_target(): init best_locality with 0
Init best_locality to fix:

osdc/Objecter.cc:1519:26: warning: variable 'best_locality' may be
 uninitialized when used here [-Wconditional-uninitialized]
              (locality >= 0 && best_locality >= 0 &&
                                ^~~~~~~~~~~~~
osdc/Objecter.cc:1511:19: note: initialize the variable 'best_locality'
 to silence this warning
        int best_locality;
                         ^
                          = 0

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-08 15:47:08 +02:00
John Spray
13750a1d03 rgw: Remove trailing ; from fn definitions
Clang:
warning: extra ';' after member function
definition [-Wextra-semi]

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-08 13:28:56 +01:00
John Spray
447335aa08 os/FileJournal: remove unused attribute
Clang:
os/FileJournal.h:224:8: warning: private field 'is_bdev' is not used
[-Wunused-private-field]

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-08 13:28:56 +01:00
John Spray
f0231ef364 mon: Fix % escaping (\% should be %%)
Clang's -Wpedantic points this out.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-08 13:28:56 +01:00
John Spray
d85b8faf11 mds: Remove redundant 'using namespace std'
This simply was not being used, and triggered
a clang warning.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-08 13:28:55 +01:00
John Spray
3fd871270b encoding: make .size() to __u32 cast explicit
Caught by clang warning that this is a conversion
from "unsigned long" to "unsigned int" which can
lose precision.  However, this is the conversion
we want because our serialization format defines
sizes as 4 bytes.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-08 13:28:55 +01:00
John Spray
6b15ce1cc6 fragtree: remove unused and broken verify()
This fn had a while(1) with no break: if anyone
had called it it would block forever.

Caught by clang's "function 'verify' could be declared
with attribute 'noreturn'" warning.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-08 13:28:55 +01:00
John Spray
8584b40686 fragtree: remove dead code
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-08 13:28:55 +01:00
Danny Al-Gaaf
b4b79ebbec remove superfluous second semicolons at end of lines
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-08 10:09:25 +02:00
Danny Al-Gaaf
1214257af8 msg: fix some -Wextra-semi warnings
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-08 09:38:28 +02:00
Danny Al-Gaaf
9ad60428dc crush/builder.c: remove some unreachable return statements
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-08 09:34:21 +02:00
Yan, Zheng
3f837254dd Merge pull request #1742 from ceph/wip-multimds
Wip multimds
2014-05-08 11:36:23 +08:00
Yan, Zheng
34e27e46a5 mds: remove unused MMDSCacheRejoin::{MISSING,FULL}
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-08 11:29:18 +08:00
Yan, Zheng
1f60060258 mds: properly wake up dentry waiters after fragmenting dirfrag
When active MDS wants to fragment a replica dirfrag, it should set
the 'replay' parameter of MDCache::adjust_dir_fragments() to false.
It makes sure that CDir::merge/split wake up any dentry waiter.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-08 11:29:18 +08:00
Yan, Zheng
5fa2bae3a5 mds: choose MIX state if replica of scatterlock is in MIX state
After ScatterLock::infer_state_from_strong_rejoin() set scatterlock
to LOCK_MIX state, don't change the scatterlock to other state.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-08 11:29:17 +08:00
Yan, Zheng
3ca0d01801 mds: switch flushing ScatterLock to dirty ScatterLock after cache rejoin
Otherwise the flushing flag may confuse Locker::eval_gather() if MDS later
imports lock's parent inode.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-08 11:29:17 +08:00
Sage Weil
8f3409d1d2 client: unlink dentry on traceless rmdir, unlink reply
This used to be handled in _unlink() and _rmdir() even when a trace was
present in the reply, but this is cleaner.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-08 10:58:55 +08:00
Sage Weil
627e644c35 client: do not manually clean up on unlink/rmdir
The reply handler will do this in a safe, ordered fashion.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-08 10:58:55 +08:00
Sage Weil
727ad64871 client: refactor _lookup; fix NULL dentry case
Return ENOENT for a valid NULL dentry in our cache.  Restructure _lookup
to avoid duplicating some code.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-08 10:58:55 +08:00
Sage Weil
635607ffad client: skip insert_trace on safe requests
Only do this for the first reply.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-08 10:58:46 +08:00
Josh Durgin
ff3987d476 Merge pull request #1766 from ceph/wip-fsx-krbd
krbd mode for librbd_fsx

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-05-07 18:13:04 -07:00
Kevin Dalley
f1d412c303 doc: Common graph used in 2 quick start files
The graph in quick-ceph-deploy.rst applies to
quick-start-preflight.rst.
The graph in deploy seems more complete, so I put the common
documentation in quick-common.rst and had it included.
doc/conf.py has 'start/quick-common.rst' in exclude patterns so that
sphinx does not complain about this file not being in toc.

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
2014-05-07 18:01:52 -07:00
Sage Weil
b1805e74b7 Merge pull request #1780 from ceph/wip-8299
rgw: fix stripe_size calculation

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-07 15:14:47 -07:00
Sage Weil
6a06f320c1 Merge pull request #1776 from ceph/wip-8289
rgw: cut short object read if a chunk returns error

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-07 15:03:31 -07:00
Sage Weil
7f5de5d00f Merge pull request #1773 from ceph/wip-8170
rgw: send user manifest header field

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-07 14:53:04 -07:00
Sage Weil
d1307631c9 vstart.sh: fix client admin socket path
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-07 14:46:53 -07:00
David Zafman
0ee409b609 osd: Remove classic scrub code since Argonaut osd can't join
Fixes: #7553

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-05-07 12:45:12 -07:00
Danny Al-Gaaf
81c74182aa ECUtil.h: clarify calculation with braces
Fix for cppcheck issue:
 [src/osd/ECUtil.h:61]: (style) Clarify calculation
  precedence for '%' and '?'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 21:18:44 +02:00
Samuel Just
499b29a323 Merge pull request #1783 from guangyy/folder-merge-doc
Update doc to reflect the bahavior change for filestore_merge_threshold setting.

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-07 11:05:59 -07:00
Samuel Just
7b1b553de0 Merge pull request #1784 from ceph/wip-da-cleanup-includes
Cleanup some included headers

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-07 11:05:07 -07:00
Danny Al-Gaaf
5752d76e9b rgw_acl_swift.h: fix #define header guard
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 18:52:49 +02:00
Danny Al-Gaaf
8059c9fb77 rgw_rest_metadata.cc: fix -Wparentheses-equality
Fix for:
warning: equality comparison with extraneous parentheses
 [-Wparentheses-equality]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 18:02:51 +02:00
Danny Al-Gaaf
8a0c016381 ReplicatedPG.cc: fix -Wparentheses
Fix for:
warning: using the result of an assignment as  a condition
 without parentheses [-Wparentheses]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 18:00:10 +02:00
Danny Al-Gaaf
a0f59df157 test_rgw_manifest.cc: fix VLA of non-POD element type
Use vector to fix:
test/rgw/test_rgw_manifest.cc:184:20: error: variable length array
 of non-POD element type 'RGWObjManifest'
  RGWObjManifest pm[num_parts];

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 17:32:02 +02:00
Danny Al-Gaaf
6c49d6e126 Merge pull request #1775 from ceph/wip-rbd-clang
fix clang-analyzer warnings in rbd and objectcacher

Reviewed-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 15:47:56 +02:00
Danny Al-Gaaf
3d280d6b10 Merge pull request #1782 from xinglin/coverity-fixes
test/libcephfs/test.cc: free cmount structure before return

Reviewed-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 15:34:30 +02:00
Ilya Dryomov
817985b4dd test_librbd_fsx: align temporary buffers allocated in check_clone()
check_clone() allocates temporary good_buf and temp_buf with malloc(),
which is not good enough for krbd with O_DIRECT.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-05-07 17:30:06 +04:00
Ilya Dryomov
ab9de9c05c test_librbd_fsx: wire up O_DIRECT mode
Wire up O_DIRECT mode (-Z) for krbd, to have a workaround for possible
problems with BLKDISCARD leaving stale entries in the buffer cache in
place.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-05-07 17:30:06 +04:00
Ilya Dryomov
c4a764cc80 test_librbd_fsx: fix a bug in docloseopen()
docloseopen() always opens $iname image.  This is bad, because the
image we had opened could have been something like $iname-clone3.  Fix
it by leveraging the fact that rbd_ctx has an image name field.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-05-07 17:30:05 +04:00
Ilya Dryomov
421e6c5617 test_librbd_fsx: add krbd mode support
Add krbd mode support (-K) to test krbd in the same way librbd is
tested.  This introduces a dependency on libkrbd and, because it's
a C++ static library, requires C++ linking.  The rbd_operations
framework can be extended in the future to also test rbd_fuse.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-05-07 17:30:05 +04:00