We can skip unwanted dn which < (offset_key, snap) via map.lower_bound, rather than
iterate across them.
Previously we iterate and skip dn which < (offset_key, dn->last), as dn->last >= snap
means (offset_key, dn->last) >= (offset_key, snap), and such iterate_and_skip logic
still keep, so this commit doesnt change code logic but an optimization.
Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
Because:
1. All other public methods are called under the protection of cache->lock,
which makes the usage of this method is weird.
2. The only caller is _dump_extent_map(), and we can do it without this
in a simpler way.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
We could support zero-length tuples, but contiguous appender doesn't
like zero-length writes, so I've ruled them out for now.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
- Option nocapture is not really required so no problem
with the fact that FreeBSD env does not work for params
for nosetests
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Currently if user perform bench-write with io-size > 4G
then its crashing because currently during memory allocation
bufferptr taking size of buffer as a unsigned and io-size > 4G
will overflow with unsigned. so during memset operation it will
try to set io_size size of memory area pointed by bufferptr,
(bufferptr area is: (4G - io_size)), so it will cause
segmentation fault.
Fix is to return error if io-size >= 4G
Fixes: http://tracker.ceph.com/issues/18422
Reported-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
When the read or flush command fails, we need to
release segs. Or we can abort it like what we do
for write.
Signed-off-by: optimistyzy <optimistyzy@gmail.com>
prior to this change, libcommon is a convenient library which gets
linked into librados, librbd and libcephfs and all ceph executables.
this incurs some problems:
- double dose of libcommon in memory space and HDD: waste of memory
and disk space.
- if an application links to two libraries including libcommon at the
same time. take librados and libcephfs as an example, they could
interfere with each other by changing the other guy's status.
after this change, libcommon is tuned into a shared library and
renamed to libceph-common. it will be installed into $prefix/lib/ceph,
and packaged in librados2.
ceph.spec.in,debian/librados2.install: package libceph-common in
librados2.
CMakeLists.txt:
- do not link against libboost-* if not necessary.
- s/common/ceph-common/g
- install libceph-common into $prefix/lib/ceph
- set rpath to $prefix/lib/ceph
- link against ceph-common if an executable needs access to non public
symbols in ceph.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Struct CapSnap holds a reference to its parent inode. So erasing
struct CapSnap from Inode::cap_snaps may drop inode's last reference.
The inode gets freed in the middle of erasing struct CapSnap
Fixes: http://tracker.ceph.com/issues/18460
Signed-off-by: Yan, Zheng <zyan@redhat.com>
{rmdir/rename}_prepare_witness() use full path to compose slave
requests. But they do not lock all dentries in the path. So someone
else changes the unlocked dentry and causes path travsese of slave
request to fail.
Signed-off-by: Yan, Zheng <zyan@redhat.com>