]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: use SimpleLock::WAIT_ALL for wait mask 68313/head
authorPatrick Donnelly <pdonnell@ibm.com>
Tue, 24 Feb 2026 19:30:24 +0000 (14:30 -0500)
committerJos Collin <jcollin@redhat.com>
Fri, 10 Apr 2026 10:48:38 +0000 (16:18 +0530)
The Locker uses has_any_waiter for a particular lock to evaluate whether
to nudge the log. For the squid, tentacle, and main branches, this
larger bit mask (all 64 bits) will cause this to wrongly return true for
other locks which have waiters. The side-effect of waking requests
spuriously is undesirable but should not affect performance
significantly.

For reef and older releases, using std::numeric_limits<uint64_t>::max()
in has_any_waiter() causes a bitwise overflow that sets the wait-queue
search bound impossibly high, resulting in the method always incorrectly
returning false. This results in nudge_log never nudging the log!

Fixes: db5c9dc2e6cc95a8d112c2131e4cac5340ca9dd0
Fixes: https://tracker.ceph.com/issues/75141
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 0be3a7896be1d5e9d6b04a6b943c2b5535b8523f)

src/mds/SimpleLock.h

index a46f0d6d32879bc5da52c6cbbfa3794c3f61805c..863f37d2e24ad45a1d3a689dbd5c542b153a33c2 100644 (file)
@@ -251,7 +251,7 @@ public:
     return parent->is_waiter_for(getmask(mask));
   }
   bool has_any_waiter() const {
-    return is_waiter_for(std::numeric_limits<uint64_t>::max());
+    return is_waiter_for(WAIT_ALL);
   }
 
   bool is_cached() const {