From: Ilya Dryomov Date: Mon, 22 Dec 2025 16:22:53 +0000 (+0100) Subject: librbd: amend error message in lock_acquire() X-Git-Tag: testing/wip-pdonnell-testing-20260219.182737-tentacle~3^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=682c162e40a61506596375791f73c0691b45c97a;p=ceph-ci.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 56766317232..afe0bb96abb 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -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(); }