The object_map_resize sanity check ensures that a resize will
not erase state for an in-use object. The check was incorrectly
including a block within the new object map range.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If the RBD object map is invalidated during the run of the test,
the tests will now return a failed status to alert to an issue
with the object map.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
As a convenience, get_flags now retrieves the current image
flags as well as all historical snapshop flags with a single
librados operation.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The object map wasn't being properly refreshed after setting
the snapshot context on the parent image. Additionally fixed
a potential deadlock that could have occurred if no object
map update was required when trimming an image.
Fixes: #10706
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
According to the manual 'mount -f' adds an entry in /etc/mtab.
Therefore the 'mount -v' command needs the flag -n to avoid
duplicate entries in /etc/mtab.
Signed-off-by: Karel Striegel <karel@striegel.be>
The AioRemove state machine is not properly advanced from
_PRE to _FLAT. This will result in an infinite state machine
loop.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
If exclusive locking was enabled, the librbd aio_flush command
would block waiting for queued AIO operations to proceed once
the exclusive lock was obtained. Now librbd will no longer
block when aio_flush is invoked and AIO operations are waiting
on the exclusive lock.
Fixes: #10714
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
A circular reference was inadvertently created when using the
CFUNCTYPE binding for callbacks for the asynchronous i/o callbacks.
This commit refactors the usage of the callbacks such that the
Ioctx object does not have a class reference to the callbacks.
Fixes: #10723
Backport: giant, firefly, dumpling
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Reviewed-by: Dan Mick <dmick@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Switched the rbd CLI tool to use the new watch/unwatch API
and properly unwatch the image before exiting. Additionally,
the watch command opened the image twice -- once R/W and another
R/O. This resulted in two watches being created for the image.
Cleaned up old/new format detection by using the existing API
methods.
Fixes: #10709
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Import, export, and benchmark operations now use the librados
IO hints to indicate the read/write pattern and whether caching
is required.
Fixes: #10462
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>