introduce RBD_SNAP_REMOVE_FLATTEN for flags of Image::snap_remove2()
to auto flatten the children of snapshot which we want to remove.
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
currently, we only have one api for snap_remove, but if we want to
pass more options about snapshot removal, that's impossible.
This patch introduce a new api of snap_remove2 here to solve
this problem.
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
msgr is part of libcommon. and the later is linked into both libcephfs
and librados. and hence into cephfs.so and rados.so. that's why we have
double free.
Fixes: http://tracker.ceph.com/issues/16686
Signed-off-by: Kefu Chai <kchai@redhat.com>
This function assumes that the source path
does not point to a null dentry, and that
path_traverse is therefore setting the
passed inode.
Candidate code path for crash
in http://tracker.ceph.com/issues/16807
Signed-off-by: John Spray <john.spray@redhat.com>
ReplicatedPG::new_repop() returns a pointer to RepGather with two refcounts,
one is held by ReplicatedPG::repop_queue, the other is supposed to be
held by the caller of this function. but it's caller
ReplicatedPG::submit_log_entries() assigns it to a
boost::intrusive_ptr<RepGather>() directly, why by default add_ref() in
its constructor. this makes the refcount 3. that's why we have a leak of
RepGather in `ReplicatedPG::new_repop(ObcLockManager&&,
boost::optional<std::function<void ()>>&&)`.
Fixes: http://tracker.ceph.com/issues/16801
Signed-off-by: Kefu Chai <kchai@redhat.com>
this behaviour matches the autotools. and we should not enable profiling
unless asked to do so.
Fixes: http://tracker.ceph.com/issues/16804
Signed-off-by: Kefu Chai <kchai@redhat.com>
* we used to check the header file of "aio.h" which is part of glibc,
the glibc async i/o, and the corresponding library is librt. but what
we are using is libaio.
* reference libaio using AIO_LIBRARIES for consistency.
Signed-off-by: Kefu Chai <kchai@redhat.com>
for example
```
include_directories(${LEVELDB_PREFIX}/include)
```
does not make sense if `LEVELDB_PREFIX` is not defined.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* we don't need the BABELTRACE_PATH_HINT setting, as packaging script
requires the the babeltrace pacakges explicitly.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* use find_package_handle_standard_args() and remove unused bits.
* rename OPENLDAP_LIBS to OPENLDAP_LIBRARIES, to be consistent with
find_package() modules.
Signed-off-by: Kefu Chai <kchai@redhat.com>
libuuid dependency is not found in ceph.spec.in or debian/control.
and we are not using libuuid since 62bfc7a.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Despite using the -k option, vstart would sometimes (e.g. --smallmds) append
changes to the config file. This commit runs all config changes through a
function which checks if the config file should be overwritten.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
o Add prun/prunb for echoing out a command and running it.
o Add quotes around some variables to prevent word splitting.
o Use "$@" instead of $* or (it is incorrect but often works anyway).
o Sprinkle in some extra command prints.
o Use function for ceph_adm rather than command prefixing.
I also corrected some whitespace where tab/spaces were mixed in the diff.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
This piece of code was dereferencing an invalid
iterator (invalidated by call to erase())
Fixes: http://tracker.ceph.com/issues/16764
Signed-off-by: John Spray <john.spray@redhat.com>