From ff89abf5ddcca91c34cfd46d288d41fe93ec38b0 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Mon, 22 Dec 2025 19:07:27 +0100 Subject: [PATCH] librbd: fix RequestLockPayload log message in ImageWatcher exclusive_lock::Policy::lock_requested() isn't guaranteed to queue the release of exclusive lock (and in fact only one of the two existing implementations does that). Instead of talking about the lock, log the response to the notification. Signed-off-by: Ilya Dryomov --- src/librbd/ImageWatcher.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librbd/ImageWatcher.cc b/src/librbd/ImageWatcher.cc index cba2c78f2f0..6c0da62f5d3 100644 --- a/src/librbd/ImageWatcher.cc +++ b/src/librbd/ImageWatcher.cc @@ -1067,11 +1067,11 @@ bool ImageWatcher::handle_payload(const RequestLockPayload &payload, return true; } - ldout(m_image_ctx.cct, 10) << this << " queuing release of exclusive lock" - << dendl; + // potentially queue release of exclusive lock r = m_image_ctx.get_exclusive_lock_policy()->lock_requested( payload.force); } + ldout(m_image_ctx.cct, 10) << this << " responding with r=" << r << dendl; encode(ResponseMessage(r), ack_ctx->out); } return true; -- 2.47.3