From 8190f5216d31f666af097b3cf8462264f7fe164a Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 24 Feb 2026 14:30:24 -0500 Subject: [PATCH] mds: use SimpleLock::WAIT_ALL for wait mask 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::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 (cherry picked from commit 0be3a7896be1d5e9d6b04a6b943c2b5535b8523f) --- src/mds/SimpleLock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/SimpleLock.h b/src/mds/SimpleLock.h index d9eb13231541..cd47e1d1a2f7 100644 --- a/src/mds/SimpleLock.h +++ b/src/mds/SimpleLock.h @@ -240,7 +240,7 @@ public: return parent->is_waiter_for(getmask(mask)); } bool has_any_waiter() const { - return is_waiter_for(std::numeric_limits::max()); + return is_waiter_for(WAIT_ALL); } bool is_cached() const { -- 2.47.3