]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/io_exerciser: Modify is_locked_by_me call in ceph_test_rados_io_sequence 60211/head
authorJonBailey1993 <jonathan.bailey1@ibm.com>
Wed, 9 Oct 2024 10:28:42 +0000 (11:28 +0100)
committerJonBailey1993 <jonathan.bailey1@ibm.com>
Wed, 9 Oct 2024 10:28:51 +0000 (11:28 +0100)
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 <jonathan.bailey1@ibm.com>
src/common/io_exerciser/RadosIo.cc

index 41be2885f3f673af83b0dabc207739c811b76c91..a28a1e2f488b47c55ca572fff2035c87218db711 100644 (file)
@@ -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;
   }