In repair_object, if bad_peer is replica, it don't add soid in
MissingLoc for ec pool. If there are more bad replica for ec pool
which cause object can't recover, the later recoverying will endless.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
A proxied flatten request could be replayed, resulting in a
-EINVAL error code being generated on the second attempt. Filter
out that error if it is known the parent did exist before the
op started.
Fixes: #11370
Backport: hammer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
this change fixes the "store-copy" command.
Like the bug reported in http://tracker.ceph.com/issues/10093.
Signed-off-by: huangjun <hjwsm1989@gmail.com>
If snap inode exists, capability's client_follow has already been
updated by MDCache::cow_inode(). So we only update client_follow
when the inode was not COWed.
Besides, we need to check return of SnapRealm::get_snap_following().
It can return CEPH_NOSNAP, which is clearly invalid for client_follows.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
the snapid check in Locker::_do_null_snapflush() prevents us from
flushing old snap inodes. The check does not make sense.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
this avoids assert(!dn->state_test(CDentry::STATE_PURGING)) in
eval_stray() being triggered when processing the delayed list.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Fixes: #11437
Don't deal with end_marker if there's a namespace set for the object
listing. The cur_end_marker.empty() check is incorrect if no end_marker
is provided, but a namespace is set. Just avoid this issue entirely, as
it's not needed.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Fixes: #11435
A complete multipart upload should not succeed if parts were not
specified. Also, adjust return codes.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
If ImageCtx::init() fails, perf counters are still used when closing
the image. To prevent uninitialized use, it's easiest to always
initialize them before anything that can fail in ImageCtx::init().
This was moved in 6055df3985, but it's
not necessary to delay perf counter initialization for any extra
configuration.
Fixes: #11433
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
During Ceph upgrade testing, older Ceph test suites assume that
get_features will return -ENOENT if provided a missing snapshot.
Support these negative tests until the older releases are no
longer supported.
Fixes: #11380
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
average_util should be calculated from the same set of nodes that
dump_item considers when calculating the stddev.
While here, remove unnecessary check for kb > 0:
get_bucket_utilization returns false if kb <= 0.
Also, update get_bucket_utilization accordingly to the preferred
convention to use pointers and not references for output arguments.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
Add a test to exercise rbd unmap. This was inspired by and is mostly
for rbd unmap <image-name> (aka spec), but rbd unmap <device> is tested
as well. Any significant change to krbd.cc or corresponding rbd cli
should be tested in the following three configurations at least:
- kernel < 3.14
- kernel >= 3.14, rbd.single_major=N
- kernel >= 3.14, rbd.single_major=Y
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Make use of krbd_unmap_by_spec() and allow unmapping by <image-name>
(i.e. pool/image@snap spec) with a bunch of careful adjustments to the
fragile command args/options parsing process to make --pool, --image
and --snap options work as expected for rbd unmap <image-name> case.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Make unmapping by (pool, image, snap) spec possible. For specs mapped
multiple times unmap one device per krbd_unmap_by_spec() call.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>