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>
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>
In preparation for krbd mode support, introduce an option to disable
randomized striping. The kernel as of 3.15 does not support "fancy"
striping and will not map images with non-default striping values.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
In preparation for krbd mode support, provide an option to specify
alignment for discards. The kernel will reject discard requests whose
offset and length are not sector-size aligned.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
In preparation for krbd mode support, change check_trunc_hack() to
resize to a sector-size aligned value. The kernel will not work with
images whose size is not sector-size aligned.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Use posix_memalign() to allocate good_buf and temp_buf, which must be
writebdy and readbdy aligned respectively. Using round_ptr_up() the
way it is used makes fsx crash on free()s at the end of main(), because
the pointer returned by malloc() is overwritten by the aligned pointer.
Drop round_ptr_up() as it is no longer used.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>