]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: amend error message in lock_acquire()
authorIlya Dryomov <idryomov@gmail.com>
Mon, 22 Dec 2025 16:22:53 +0000 (17:22 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 20 Jan 2026 00:13:20 +0000 (01:13 +0100)
... since it went stale with commit 2914eef50d69 ("rbd: Changed
exclusive-lock implementation to use the new managed-lock").  In the
context of exclusive lock, requesting the lock refers to a specific
action which may or may not be performed as part of acquiring the lock
and lock_acquire() doesn't get visibility into that.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/internal.cc

index baf7a85e136f9c1ef3a6e78ad9295f777b1e4986..65e569b4ca397e9cb8641eaecd192d6cb29a570c 100644 (file)
@@ -975,7 +975,7 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) {
 
     int r = lock_ctx.wait();
     if (r < 0) {
-      lderr(cct) << "failed to request exclusive lock: " << cpp_strerror(r)
+      lderr(cct) << "failed to acquire exclusive lock: " << cpp_strerror(r)
                 << dendl;
       return r;
     }
@@ -984,7 +984,6 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) {
     if (ictx->exclusive_lock == nullptr) {
       return -EINVAL;
     } else if (!ictx->exclusive_lock->is_lock_owner()) {
-      lderr(cct) << "failed to acquire exclusive lock" << dendl;
       return ictx->exclusive_lock->get_unlocked_op_error();
     }