On 21 Feb 2025, at 9:58, Jeff Layton wrote: > On Fri, 2025-02-21 at 09:46 -0500, Benjamin Coddington wrote: >> On 21 Feb 2025, at 9:37, Jeff Layton wrote: >> >>> On Fri, 2025-02-21 at 09:06 -0500, Benjamin Coddington wrote: >>>> On 18 Feb 2025, at 9:40, Jeff Layton wrote: >>> >>> lease_breaking() is only checked when want_write is false. IOW, if >>> you're breaking the lease for write, then lm_break is always called. >>> >>> Is that a bug or a feature? I'm not sure, but it's been that way since >>> ~2011. >> >> Yeah.. why? >> >> Thanks I missed that detail when I refreshed my memory of it just now. >> Seems like you'd want to avoid constantly calling lm_break for both cases, >> spamming the lock manager adds nothing. 2 cents. >> > > Sorry, it doesn't get called every time. If want_write is called then > we _do_ check FL_UNLOCK_PENDING. IOW, you can get a downgrade attempt > first, and then a full unlock request later. > > nfsd doesn't do downgrades. It recalls the object either way. So, > ignoring subsequent lm_break calls is the right thing to do, I think. Got it, thanks for clarifying this behavior for me! Ben