]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: fix RequestLockPayload log message in ImageWatcher
authorIlya Dryomov <idryomov@gmail.com>
Mon, 22 Dec 2025 18:07:27 +0000 (19:07 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 20 Jan 2026 00:13:20 +0000 (01:13 +0100)
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 <idryomov@gmail.com>
src/librbd/ImageWatcher.cc

index cba2c78f2f048228a162f430fce4b12387d266a3..6c0da62f5d3065134add4cc8bd4a9577129826ee 100644 (file)
@@ -1067,11 +1067,11 @@ bool ImageWatcher<I>::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;