Skip to content

exportfs: add flag to allow marking export operations as only supporting file handles

Christian Brauner linux-fsdevel linux-nfs lkml llvm oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected] change-id 20241201-work-exportfs-cd49bee773c5

Versions newest first

  1. v1 Latest4 patches 27 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4exportfs: add flag to indicate local file handlesfs/nfsd/export.c include/linux/exportfs.h+8 -13 replies
2/4kernfs: restrict to local file handlesfs/kernfs/mount.c+1 -00 replies
3/4ovl: restrict to exportable file handlesfs/overlayfs/util.c+6 -10 replies
4/4pidfs: restrict to local file handlesfs/pidfs.c+1 -00 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJeff LaytonAmir GoldsteinChuck Lever
SeriesR-b R-b A-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/4] exportfs: add flag to allow marking export operations as only supporting file handles

Hey,

Some filesystems like kernfs and pidfs support file handles as a convenience to enable the use of name_to_handle_at(2) and open_by_handle_at(2) but don't want to and cannot be reliably exported. Add a flag that allows them to mark their export operations accordingly and make NFS check for its presence.

@Amir, I'll reorder the patches such that this series comes prior to the pidfs file handle series. Doing it that way will mean that there's never a state where pidfs supports file handles while also being exportable. It's probably not a big deal but it's definitely cleaner. It also means the last patch in this series to mark pidfs as non-exportable can be dropped. Instead pidfs export operations will be marked as non-exportable in the patch that they are added in.

Thanks!
Christian

---
Christian Brauner (4):
exportfs: add flag to indicate local file handles
kernfs: restrict to local file handles
ovl: restrict to exportable file handles
pidfs: restrict to local file handles

 fs/kernfs/mount.c        | 1 +
 fs/nfsd/export.c         | 8 +++++++-
 fs/overlayfs/util.c      | 7 ++++++-
 fs/pidfs.c               | 1 +
 include/linux/exportfs.h | 1 +
 5 files changed, 16 insertions(+), 2 deletions(-)

---
base-commit: 74e20c5946ab3f8ad959ea34f63f21e157d3ebae
change-id: 20241201-work-exportfs-cd49bee773c5