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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>