linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch 0/2] NFSD: Fix server hang when there are multiple layout conflicts
@ 2025-11-06 17:05 Dai Ngo
  2025-11-06 17:05 ` [PATCH 1/2] locks: Introduce lm_breaker_timedout op to lease_manager_operations Dai Ngo
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Dai Ngo @ 2025-11-06 17:05 UTC (permalink / raw)
  To: chuck.lever, jlayton, neilb, okorniev, tom, hch, alex.aring, viro,
	brauner, jack
  Cc: linux-fsdevel, linux-kernel, linux-nfs

When a layout conflict triggers a call to __break_lease, the function
nfsd4_layout_lm_break clears the fl_break_time timeout before sending
the CB_LAYOUTRECALL. As a result, __break_lease repeatedly restarts
its loop, waiting indefinitely for the conflicting file lease to be
released.

If the number of lease conflicts matches the number of NFSD threads (which
defaults to 8), all available NFSD threads become occupied. Consequently,
there are no threads left to handle incoming requests or callback replies,
leading to a total hang of the NFS server.

This issue is reliably reproducible by running the Git test suite on a
configuration using SCSI layout.

This patchset fixes this problem by introducing the new lm_breaker_timedout
operation to lease_manager_operations and using timeout for layout
lease break.

 Documentation/filesystems/locking.rst |  2 ++
 fs/locks.c                            | 14 +++++++++++---
 fs/nfsd/nfs4layouts.c                 | 25 +++++++++++++++++++++----
 include/linux/filelock.h              |  2 ++
 4 files changed, 36 insertions(+), 7 deletions(-)


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-11-11 15:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-06 17:05 [Patch 0/2] NFSD: Fix server hang when there are multiple layout conflicts Dai Ngo
2025-11-06 17:05 ` [PATCH 1/2] locks: Introduce lm_breaker_timedout op to lease_manager_operations Dai Ngo
2025-11-07 13:26   ` Christoph Hellwig
2025-11-07 16:58     ` Dai Ngo
2025-11-06 17:05 ` [PATCH 2/2] NFSD: Fix server hang when there are multiple layout conflicts Dai Ngo
2025-11-07 13:29   ` Christoph Hellwig
2025-11-07 17:01     ` Dai Ngo
2025-11-07 13:30 ` [Patch 0/2] " Christoph Hellwig
2025-11-09 18:34 ` Benjamin Coddington
2025-11-11 15:24   ` Dai Ngo
2025-11-11 15:34     ` Chuck Lever
2025-11-11 15:36       ` Christoph Hellwig
2025-11-11 15:43       ` Dai Ngo
2025-11-11 15:53         ` Chuck Lever
2025-11-11 15:45     ` Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).