From: JonBailey1993 Date: Wed, 9 Oct 2024 10:28:42 +0000 (+0100) Subject: common/io_exerciser: Modify is_locked_by_me call in ceph_test_rados_io_sequence X-Git-Tag: testing/wip-vshankar-testing-20241016.135728-debug~52^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a0c51d0e7f05e84411e3877b5861f3eec26ad934;p=ceph-ci.git common/io_exerciser: Modify is_locked_by_me call in ceph_test_rados_io_sequence is_locked_by_me() is a function of ceph::mutex which is only used in debug builds. By using the ceph_mutex_is_locked_by_me macro, we can neatly make sure we only run this function in debug mode, allowing compilation to no longer be affected when running in release mode. Signed-off-by: Jon Bailey --- diff --git a/src/common/io_exerciser/RadosIo.cc b/src/common/io_exerciser/RadosIo.cc index 41be2885f3f..a28a1e2f488 100644 --- a/src/common/io_exerciser/RadosIo.cc +++ b/src/common/io_exerciser/RadosIo.cc @@ -81,7 +81,7 @@ RadosIo::AsyncOpInfo::AsyncOpInfo(uint64_t offset1, uint64_t length1, bool RadosIo::readyForIoOp(IoOp &op) { - ceph_assert(lock.is_locked_by_me()); //Must be called with lock held + ceph_assert(ceph_mutex_is_locked_by_me(lock)); //Must be called with lock held if (!om->readyForIoOp(op)) { return false; }