From: Ilya Dryomov Date: Mon, 22 Dec 2025 16:22:53 +0000 (+0100) Subject: librbd: amend error message in lock_acquire() X-Git-Tag: v19.2.4~54^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8e4b033b15760740649f0956ffb4a54aa377ccff;p=ceph.git librbd: amend error message in lock_acquire() ... 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 (cherry picked from commit 9159a2dd032bf47a030260660ff64b5be2d72648) --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index dd674f3a949..c491e7c2a69 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -967,7 +967,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; } @@ -976,7 +976,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(); }