lockdep will complain about loop cycles that won't cause an
issue in reality as replay and record are two different
journal states.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If two or more images share the same CephContext, notifications
from one image can block the work queue which will potentially
block acknowledging the notification until after it times out.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The header update and lock notifications might be invoked
from the librados AIO thread. Update the close state
machine to flush any potential AIO notifications.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This implements run_in_thread inside the ceph command itself.
And fixes the ceph command bootstrap when it run inside the
source tree to correctly load the new rados python module.
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
Notable changes:
* run_in_thread have disapeared
* timeout argument of some methods are ignored
* rados_create_write_op/rados_create_read_op returns WriteOp/ReadOp
instead of the pointer address
* rados_monitor_log callback 'arg' arguments was broken in previous python
binding (callback was called with the pointer address instead pointed object)
* object attributes that was pointer addresses are now private and not accessible in python
Some tests have been added to cover all methods
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
To allow to create a autonomous rados module with cython.
We move the current librbdpy to the rbd sub directory.
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
Otherwise it's possible that the notification will be blocked if
the librados AIO thread isn't available to invoke the notification
handler.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If multiple states are pending, it's possible for an image to
be closed while the state lock is unlocked during the callback.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The AIO image open might complete under the librados AIO callback.
Attempting to close the old image handle under that thread will
deadlock under the new librados_test_stub flush handling.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
There are sporadic librbd unit test failures due to the
mock being destroyed while an active librados_test_stub
AIO callback is completing.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The CEPH_PAGE_SIZE is not actually a constant. On aarch64 platforms
the page size is 64K instead of the assumed 4K. The CRC block
computations require a true constant.
Fixes: #14747
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
These are minor cleanups that do not affect the code in a
material way:
- Forgot to add --tenant to usage message
- Make the help slightly less misleading
- Fix a strange error message "could not add remove caps"
- Spelling in a comment
- The vstart.sh can be run with civetweb
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>