filer: cooling-off dual-read for POSIX locks during ring changes (#9672)

While the ring changed within the last snapshot interval, a fresh owner
asks the key's previous owner (LockRing.PriorOwner) whether it still
holds a conflicting lock before granting TRY_LOCK or answering GET_LK, so
it does not double-grant before re-assertion rebuilds its local state.
The probe is marked cooling_probe so the previous owner answers from
local state without recursing. PriorOwner uses the snapshot's prebuilt
ring rather than rebuilding a hash ring per call.
This commit is contained in:
Chris Lu
2026-05-25 12:34:15 -07:00
committed by GitHub
parent 881226a81b
commit a3c0baa9b0
6 changed files with 184 additions and 9 deletions
@@ -388,6 +388,8 @@ message PosixLockRequest {
bool is_moved = 2;
PosixLockOp op = 3;
PosixLockRange lock = 4;
repeated PosixLockRange locks = 5;
bool cooling_probe = 6;
}
enum PosixLockOp {