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>
Under heavy load the number of file descriptors opened
by the OSD can go beyond the 64K file limit. This patch
increases the default to 128K.
Signed-off-by: Owen Synge <osynge@suse.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>
Until now, copy_get used in promote_object/flush_object and
CEPH_OSD_OP_COPY_FROM. We add test cases for promote_object and
copy_from.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Using this field as the copy_get flags.
When using 'rados cp' copy a no-ec object w/ omap data into ecpool, it
will met this bug:
osd/ReplicatedPG.cc: 6463: FAILED assert(cop->omap_header.length() == 0)
So we add CEPH_OSD_COPY_GET_FLAG_NOTSUPP_OMAP which avoid copy omap-object from
one pool to other.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.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>
Current client code relies on cap message to trim unlinked inode
from cache. This method is too sensitive to message ordering. If
client receives the cap message while directory inode still contains
dentries that are referenced by unsafe requests, the inode can't
get trimmed.
The fix is, when rmdir/rename request finishes, try trimming the
unlinked inode again.
Fixes: #11339
Signed-off-by: Yan, Zheng <zyan@redhat.com>