If the attempt to deregister the snapshot from the parent
image fails with -ENOENT, ignore the error as it is safe
to assume that the child is not associated with the parent.
Fixes: #11113
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit cf8094942c)
get_parent_info should return -ENOENT if the image does not
have an associated parent image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 21afd0ef8e)
If we want to discard a range of an object, we will zero(use fallocate
to punch a hole) the range now. In general this introduce some overhead(extra writes).
If the filesystem ontop of RBD holding lots of small files, this
behavior will bring big performance penalty.
Adding a flag that allow user to control if they want to zero the
range.
Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
- If the journal is required, require it.
- If the journal is not allowed, do not allow one to be specified
- If the journal is not wanted, to not set one up by default when none is
provided.
See #9580
Signed-off-by: Sage Weil <sage@redhat.com>
Remove code duplication by generalizing ceph_argparse_with{int,float,longlong}
routines - make one template function for those cases.
Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
Remove erroneous arg for ceph_argparse_witharg call when '--io-pattern' parsed:
the name look up will point the compiler to bool ceph_argparse_witharg(
std::vector<const char*> &args,
std::vector<const char*>::iterator &i, std::string *ret, ...) when compiler
is resolving this function call. The &err argument will be wrongly interpreted
as a char * variable to be compared with the argument name pointed by i.
Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
The librbd unit tests currently only test the old image format. Ensure
the new format and its possible features are also tested.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
FileJournal needs stuff from blkdev.c in libcommon.
./.libs/libosd.a(libos_la-FileJournal.o): In function `FileJournal::_open_block_device()':
/home/nwatkins/src/ceph/src/os/FileJournal.cc:139: undefined reference to `get_block_device_size(int, long*)'
/home/nwatkins/src/ceph/src/os/FileJournal.cc:161: undefined reference to `block_device_support_discard(char const*)'
./.libs/libosd.a(libos_la-FileJournal.o): In function `FileJournal::do_discard(long, long)':
/home/nwatkins/src/ceph/src/os/FileJournal.cc:1587: undefined reference to `block_device_discard(int, long, long)'
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
If we are in recovery_wait, we might not recover that object as part of
recover_primary for some time. Worse, if we are waiting on a backfill
which is blocked waiting on a copy_from on the missing object in
question, it can become a dead lock.
Fixes: 11244
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
This way, even empty objects have the hinfo key written. That way,
touch and touch->append->truncate end up with the same state.
Fixes: 11265
Signed-off-by: Samuel Just <sjust@redhat.com>
Add some performance critial configurations
Also group and polish the description of each configuration
to make it more clear, changed the default from 0 to actual
value.
Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
This will help prevent drift in the future. It also makes it clear
that the flags are supposed to have the same values.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Just verify that the read gets the right data, to demonstrate that
passing a flag doesn't cause problems.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
We don't want to spit out the warning twice, and we don't have cct
anyway.
Also test_init is annoying; we should try to kill it.
Signed-off-by: Sage Weil <sage@redhat.com>
This reverts commit 4bd2bd6bb8.
These constants are the only way these flags are exposed through the C
interface. C users can't include librados.hpp. Ideally we would have
only one version of these (just the C ones), but the C++ ones came
first and need to stay for backwards compatibility.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
osd: coalesce into single omap_setkeys for normal writes
Tested-by: Andreas Bluemle <andreas.bluemle@itxperts.de>
Reviewed-by: David Zafman <dzafman@redhat.com>
The user mtime and local_mtime are normally set in finish_ctx based on the
value of ctx->mtime; clear that to avoid this update.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
[Sage: simplified]
Signed-off-by: Sage Weil <sage@redhat.com>