The modified copyup behavior will need to update snapshot object
maps when performing a copyup since the object will now exist within
all snapshots of the image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When the deep-flatten feature is enabled, the remove_parent
class method should also remove the parent from all snapshots.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
AIO operations can be executed with a different snapshot
context from the IoCtx. librbd takes advantage of this
capability to perform a deep object copyup.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This allows child object to exist through all existing
snapshots as well as HEAD. If the operation was a CoW,
issue the write ops as a separate RADOS op with the
correct snapshot context.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Move AbstractWrite's invocation of copyup to the CopyupRequest
class. The AioRequest write path will now always create a
CopyupRequest, which will now append the actual write ops to the
copyup.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Copy-on-read/write will now use an empty snapshot context to
deep-copy the object through all existing snapshots. With the
deep-flatten feature enabled, the flatten operation will now
disconnect a child image from its parent even if it has existing
snapshots.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
With the fast-diff feature enabled, if the object map marks the
object as _EXISTS, it can only occur due to a write -- otherwise
it would be _EXISTS_CLEAN. Therefore, ensure it is properly
flagged as an updated object for diff_iterate.
Fixes: #11553
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
librbd/librbd.cc: In member function 'int librbd::Image::metadata_get(const string&, std::string*)':
librbd/librbd.cc:845:76: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
Signed-off-by: Sage Weil <sage@redhat.com>
The ImageCtx::snaps collection is stored in newest->oldest order,
so the first snapshot id should be retrieved from the back of the
array.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If the diff_iterate call doesn't start with the first snapshot,
unmodified objects in future snapshots / HEAD are incorrectly
flagged as modified.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If an Infernalis librbd attempts to open an image stored on a
pre-Infernalis OSD, the new config metadata operations won't
be supported. This error can be safely ignored.
Fixes: #11549
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
obj_bencher rados cli: rados bench producing wrong values when different blocksize used in writes and reads
Reviewed-by: Loic Dachary <ldachary@redhat.com>
When the python CLI is given non-ASCII characters, it converts them to
\uHHHH escapes in JSON. json_spirit parses these internally into 16 bit
characters, which could only work if json_spirit were built to use
std::wstring, which it isn't; it's using std::string, so the high byte
ends up being zero'd, leaving the low byte which is effectively garbage.
This hack^H^H^H^H change makes json_spirit convert to utf8 internally
instead, which can be stored just fine inside a std::string.
Note that this implementation still assumes \uHHHH escapes are four hex
digits, so it'll only cope with characters in the Basic Multilingual
Plane. Still, that's rather a lot more characters than it could cope
with before ;)
(For characters outside the BMP, Python seems to generate escapes in the
form \uHHHHHHHH, i.e. 8 hex digits, which the current implementation
doesn't expect to see)
Fixes: #7387
Signed-off-by: Tim Serong <tserong@suse.com>
If the detection of the old format fails with reasons other than
-ENOENT, we should return with this error. Otherwise, if we continue the
new format detection and fail with -ENOENT, the caller will get the
missleading failure information.
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
* do not require sphinx-build if --without-man-pages
* dist rst files for man pages
* build and dist .8 files if sphinx-build is found
Signed-off-by: Kefu Chai <kchai@redhat.com>
When dumping statistics of OSDs such as running command "ceph osd df",
the sum of OSDs' size is 2^10 times less than their real size.
Signed-off-by: Zhe Zhang <zzxuanyuan@gmail.com>
Rename aio_bench argument 'op_size' to 'object_size' to reflect the reality of
how it is used.
Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
Add handling of situation when '-b|--block-size' option is using with
'bench seq' or 'bench rand' which is erroneous according to the help message:
-b op_size
set the size of write ops for put or benchmarking
Fixes: #10163
Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
'trans_size' description from header: "size of the write/read to perform"
But really 'object_size' is used in write/read operations. 'trans_size' is used
only in ObjBencher::status_printer for calc current and average bandwidth.
As result - bad statistics in case 'trans_size' and and 'object_size' are different.
Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>