]> 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>
Thu, 12 Feb 2026 17:04:09 +0000 (18:04 +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>
(cherry picked from commit 9159a2dd032bf47a030260660ff64b5be2d72648)

src/librbd/internal.cc

index 5676631723291c73ebb917f27946c29bb7197669..afe0bb96abb4ecf01285e946d2d3da0382db7de1 100644 (file)
@@ -974,7 +974,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;
     }
@@ -983,7 +983,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();
     }