Any information stashed in the OpContext may be obsolete by the time we
actually mark the object clean. Instead, let the start_flush caller
clean up its OpContext and in try_flush_mark_clean we'll create a new
one. The primary reason to keep the OpContext would have been locking,
but we can set the obc as blocking without holding an OpContext, and
that would allow trimming to happen in the mean time (which is good
since trim_object does not respect rw locks since it doesn't change user
visible state). In try_flush_mark_clean, we requeue the fop->op along
with (but ahead of) the fop->dup_ops.
Fixes: #8068
Signed-off-by: Samuel Just <sam.just@inktank.com>
Fixes: #8202
This fixes the radosgw side of issue #8202. Needed to cast value
to unsigned char, otherwise it'd get padded.
Backport: dumpling
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
...so that they pass when they get unlucky with thrashing.
This will vastly decrease the probability of failure, but failure will
always be possible when a timeout is in place.
Fixes: #8193
Signed-off-by: Sage Weil <sage@inktank.com>
We need to ensure that even with pool snaps, we use the snapc provided in order
to ensure that the clones are written back correctly.
Fixes: #7941
Signed-off-by: Samuel Just <sam.just@inktank.com>
get_min_avail_to_read_shards might return an error if there are
no longer enough sources to reconstruct the missing shards.
This is possible if osds went down while we were writing the
previous chunk -- we already notice in check_recovery_sources
if a source goes down during a read.
Fixes: #8161
Signed-off-by: Samuel Just <sam.just@inktank.com>
When a pool is created with ceph osd pool create, the auid is not
inferred from the session auid and is set to zero. Add the
ceph osd pool set <pool> auid <int>
command to set it after it is created, and the matching get:
ceph osd pool get <pool> auid
Signed-off-by: Loic Dachary <loic@dachary.org>
Modified qemu-iotests workunit script to check for versions
that use the latest qemu (currently only Trusty). Limit the
tests to those that are applicable to rbd.
Fixes: 7882
Signed-off-by: Warren Usui <warren.usui@inktank.com>
Waiting for udev has been the default for a while now, and, after
switching to libkrbd, is no longer an option. (libkrbd waits for
specific devices to show up, the old behaviour was to wait for
everything udev.)
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
rbd binary will load rbd.ko itself, with appropriate options. Loading
it by hand with default options is undesirable.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Thanks to libkrbd, 'rbd map' now outputs the device node it mapped to
to stdout:
$ sudo rbd map foo
/dev/rbd0
This will allow us to get rid of a lot of ad-hoc poll/sleep code in our
qa scripts.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Add libkrbd libtool convenience library to provide an interface for
mapping and unmapping rbd images programmatically. This will be used
by the rbd binary itself and the librbd_fsx testing tool.
libkrbd takes care of the kernel module stuff (common/module.h) and
makes use of libudev to be able to properly wait for block device
creation and deletion and tell which block device got assigned by the
kernel to the newly created mapping.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
handle following sequence of events:
- mds0 exports an inode to mds1. client receives the cap import
message from mds1. caps from mds0 are removed while handling
the cap import message.
- mds1 exports an inode to mds0. client receives the cap export
message from mds1. handle_cap_export() adds placeholder caps
for mds0
- client receives the first cap export message (for exporting
inode from mds0 to mds1)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
To avoid releasing caps that are being used, encode_inode_release()
should send implemented caps to MDS.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
revert is tricky to implement at this time for ec pools, so
we'll instead just implement delete for ec pools.
Fixes: #7439
Signed-off-by: Samuel Just <sam.just@inktank.com>