Documentation/filesystems/locking.rst | 1 + fs/locks.c | 119 +++++++++++++++++----------------- fs/nfsd/nfs4layouts.c | 11 +++- fs/nfsd/nfs4state.c | 7 ++ include/linux/filelock.h | 1 + 5 files changed, 79 insertions(+), 60 deletions(-)
This patchset fixes the way that conflicts are detected when userland
requests file delegations. The problem is due to a hack that was added
long ago which worked up until userland could request a file delegation.
This fixes the bug and makes things a bit less hacky. Please consider
for v6.19.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Jeff Layton (2):
filelock: add lease_dispose_list() helper
filelock: allow lease_managers to dictate what qualifies as a conflict
Documentation/filesystems/locking.rst | 1 +
fs/locks.c | 119 +++++++++++++++++-----------------
fs/nfsd/nfs4layouts.c | 11 +++-
fs/nfsd/nfs4state.c | 7 ++
include/linux/filelock.h | 1 +
5 files changed, 79 insertions(+), 60 deletions(-)
---
base-commit: 76c63ff12e067e1ff77b19a83c24774899ed01fc
change-id: 20251201-dir-deleg-ro-41a16bc22838
Best regards,
--
Jeff Layton <jlayton@kernel.org>
On Mon, Dec 1, 2025, at 10:08 AM, Jeff Layton wrote: > This patchset fixes the way that conflicts are detected when userland > requests file delegations. The problem is due to a hack that was added > long ago which worked up until userland could request a file delegation. > > This fixes the bug and makes things a bit less hacky. Please consider > for v6.19. I would like a little more time to review this carefully, especially in light of similar work Dai has already posted in this area. If by "v6.19" you mean "not before v6.19-rcN where N > 3", then that WFM. > Signed-off-by: Jeff Layton <jlayton@kernel.org> > --- > Jeff Layton (2): > filelock: add lease_dispose_list() helper > filelock: allow lease_managers to dictate what qualifies as a conflict > > Documentation/filesystems/locking.rst | 1 + > fs/locks.c | 119 +++++++++++++++++----------------- > fs/nfsd/nfs4layouts.c | 11 +++- > fs/nfsd/nfs4state.c | 7 ++ > include/linux/filelock.h | 1 + > 5 files changed, 79 insertions(+), 60 deletions(-) > --- > base-commit: 76c63ff12e067e1ff77b19a83c24774899ed01fc > change-id: 20251201-dir-deleg-ro-41a16bc22838 > > Best regards, > -- > Jeff Layton <jlayton@kernel.org> -- Chuck Lever
On Mon, 2025-12-01 at 10:19 -0500, Chuck Lever wrote: > > On Mon, Dec 1, 2025, at 10:08 AM, Jeff Layton wrote: > > This patchset fixes the way that conflicts are detected when userland > > requests file delegations. The problem is due to a hack that was added > > long ago which worked up until userland could request a file delegation. > > > > This fixes the bug and makes things a bit less hacky. Please consider > > for v6.19. > > I would like a little more time to review this carefully, especially > in light of similar work Dai has already posted in this area. If by > "v6.19" you mean "not before v6.19-rcN where N > 3", then that WFM. > Ok. Do you have a specific concern? FWIW, I did mention to Dai that the first patch in this series would make it more palatable to handle his new lm_breaker_timedout operation in lease_dispose_list(). By v6.19, I mean before v6.19 ships. This bug needs to be fixed before we release a kernel that provides the new F_SETDELEG interface. > > > Signed-off-by: Jeff Layton <jlayton@kernel.org> > > --- > > Jeff Layton (2): > > filelock: add lease_dispose_list() helper > > filelock: allow lease_managers to dictate what qualifies as a conflict > > > > Documentation/filesystems/locking.rst | 1 + > > fs/locks.c | 119 +++++++++++++++++----------------- > > fs/nfsd/nfs4layouts.c | 11 +++- > > fs/nfsd/nfs4state.c | 7 ++ > > include/linux/filelock.h | 1 + > > 5 files changed, 79 insertions(+), 60 deletions(-) > > --- > > base-commit: 76c63ff12e067e1ff77b19a83c24774899ed01fc > > change-id: 20251201-dir-deleg-ro-41a16bc22838 > > > > Best regards, > > -- > > Jeff Layton <jlayton@kernel.org> -- Jeff Layton <jlayton@kernel.org>
On Mon, Dec 1, 2025, at 10:52 AM, Jeff Layton wrote: > On Mon, 2025-12-01 at 10:19 -0500, Chuck Lever wrote: >> >> On Mon, Dec 1, 2025, at 10:08 AM, Jeff Layton wrote: >> > This patchset fixes the way that conflicts are detected when userland >> > requests file delegations. The problem is due to a hack that was added >> > long ago which worked up until userland could request a file delegation. >> > >> > This fixes the bug and makes things a bit less hacky. Please consider >> > for v6.19. >> >> I would like a little more time to review this carefully, especially >> in light of similar work Dai has already posted in this area. If by >> "v6.19" you mean "not before v6.19-rcN where N > 3", then that WFM. >> > > Ok. Do you have a specific concern? It looks so similar to what Dai was doing to deal with nfsd deadlocking and my recent RFC in the same area that we should ensure that these efforts are all going in a compatible direction. Clearly, adding callbacks to NFSD that just return 0 is not a functional risk ;-) But during a merge window I can't guarantee I'll have time to look at this closely. > FWIW, I did mention to Dai that the > first patch in this series would make it more palatable to handle his > new lm_breaker_timedout operation in lease_dispose_list(). > > By v6.19, I mean before v6.19 ships. This bug needs to be fixed before > we release a kernel that provides the new F_SETDELEG interface. No problem. v6.19-rc rather than in the merge window is all I need. >> > Signed-off-by: Jeff Layton <jlayton@kernel.org> >> > --- >> > Jeff Layton (2): >> > filelock: add lease_dispose_list() helper >> > filelock: allow lease_managers to dictate what qualifies as a conflict >> > >> > Documentation/filesystems/locking.rst | 1 + >> > fs/locks.c | 119 +++++++++++++++++----------------- >> > fs/nfsd/nfs4layouts.c | 11 +++- >> > fs/nfsd/nfs4state.c | 7 ++ >> > include/linux/filelock.h | 1 + >> > 5 files changed, 79 insertions(+), 60 deletions(-) >> > --- >> > base-commit: 76c63ff12e067e1ff77b19a83c24774899ed01fc >> > change-id: 20251201-dir-deleg-ro-41a16bc22838 >> > >> > Best regards, >> > -- >> > Jeff Layton <jlayton@kernel.org> > > -- > Jeff Layton <jlayton@kernel.org> -- Chuck Lever
© 2016 - 2025 Red Hat, Inc.