Skip to content

add support for name_to, open_by_handle_at() to io_uring

Thomas Bertschinger io-uring linux-fsdevel linux-nfs linux-xfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 5 repliesIn review
  2. v2 RFC10 patches 13 repliesSuperseded
  3. v1 RFC6 patches 17 repliesApplied

Changes in v3 from the cover letter

- rename do_filp_path_open -> do_file_handle_open()
- rename the parameter fileid_type in xfs_fs_fh_to_{dentry,parent}() to fileid_type_flags
- a few minor style fixups reported by checkpatch.pl
- fix incorrect use of '&' instead of '&&' in exportfs_decode_fh_raw()
- add docs for EXPORT_OP_NONBLOCK in Documentation/filesystems/nfs/exporting.rst

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10fhandle: create helper for name_to_handle_at(2)fs/fhandle.c fs/internal.h+43 -270 replies
2/10io_uring: add support for IORING_OP_NAME_TO_HANDLE_ATinclude/uapi/linux/io_uring.h io_uring/opdef.c io_uring/openclose.c +1 more+63 -01 reply
3/10fhandle: helper for allocating, reading struct file_handlefs/fhandle.c fs/internal.h+39 -270 replies
4/10fhandle: create do_file_handle_open() helperfs/fhandle.c fs/internal.h+16 -60 replies
5/10fhandle: make do_file_handle_open() take struct open_flagsfs/fhandle.c fs/internal.h+11 -50 replies
6/10exportfs: allow VFS flags in struct file_handlefs/exportfs/expfs.c fs/fhandle.c include/linux/exportfs.h+28 -50 replies
7/10exportfs: new FILEID_CACHED flag for non-blocking fh lookupDocumentation/filesystems/nfs/exporting.rst fs/exportfs/expfs.c fs/fhandle.c +1 more+25 -01 reply
8/10io_uring: add __io_open_prep() helperio_uring/openclose.c+25 -101 reply
9/10io_uring: add support for IORING_OP_OPEN_BY_HANDLE_ATinclude/uapi/linux/io_uring.h io_uring/opdef.c io_uring/openclose.c +1 more+135 -01 reply
10/10xfs: add support for non-blocking fh_to_dentry()fs/xfs/xfs_export.c fs/xfs/xfs_export.h fs/xfs/xfs_handle.c+29 -101 reply

Reviews trailers per patch

5 of 10 patches have a Reviewed-by or Acked-by.

PatchAmir Goldstein
1/10R-b
2/10
3/10R-b
4/10
5/10
6/10R-b
7/10R-b
8/10
9/10
10/10A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/10] add support for name_to, open_by_handle_at() to io_uring

This series adds support for name_to_handle_at() and open_by_handle_at() to io_uring. The idea is for these opcodes to be useful for userspace NFS servers that want to use io_uring.

For both syscalls, io_uring will initially attempt to complete the operation only using cached data, and will fall back to running in async context when that is not possible.

Supporting this for open_by_handle_at() requires a way to communicate to the filesystem that it should not block in its fh_to_dentry() implementation. This is done with a new flag FILEID_CACHED which is set in the file handle by the VFS. If a filesystem supports this new flag, it will indicate that with a new flag EXPORT_OP_NONBLOCK so that the VFS knows not to call into a filesystem with the FILEID_CACHED flag, when the FS does not know about that flag.

Support for the new FILEID_CACHED flag is added for xfs.

v3 is mostly the same as [v2], with minor changes.

v2 -> v3:
- rename do_filp_path_open -> do_file_handle_open()
- rename the parameter fileid_type in xfs_fs_fh_to_{dentry,parent}() to fileid_type_flags
- a few minor style fixups reported by checkpatch.pl
- fix incorrect use of '&' instead of '&&' in exportfs_decode_fh_raw()
- add docs for EXPORT_OP_NONBLOCK in Documentation/filesystems/nfs/exporting.rst

[v2] https://lore.kernel.org/linux-fsdevel/[email protected]/
[v1] https://lore.kernel.org/linux-fsdevel/[email protected]/

Thomas Bertschinger (10):
fhandle: create helper for name_to_handle_at(2)
io_uring: add support for IORING_OP_NAME_TO_HANDLE_AT
fhandle: helper for allocating, reading struct file_handle
fhandle: create do_file_handle_open() helper
fhandle: make do_file_handle_open() take struct open_flags
exportfs: allow VFS flags in struct file_handle
exportfs: new FILEID_CACHED flag for non-blocking fh lookup
io_uring: add __io_open_prep() helper
io_uring: add support for IORING_OP_OPEN_BY_HANDLE_AT
xfs: add support for non-blocking fh_to_dentry()

 Documentation/filesystems/nfs/exporting.rst |   6 +
 fs/exportfs/expfs.c                         |  14 +-
 fs/fhandle.c                                | 155 +++++++++-------
 fs/internal.h                               |  13 ++
 fs/xfs/xfs_export.c                         |  34 +++-
 fs/xfs/xfs_export.h                         |   3 +-
 fs/xfs/xfs_handle.c                         |   2 +-
 include/linux/exportfs.h                    |  34 +++-
 include/uapi/linux/io_uring.h               |   3 +
 io_uring/opdef.c                            |  26 +++
 io_uring/openclose.c                        | 191 +++++++++++++++++++-
 io_uring/openclose.h                        |  13 ++
 12 files changed, 409 insertions(+), 85 deletions(-)

base-commit: 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c

Signature · 1 line
2.51.0