Skip to content

io_uring: add fremovexattr and flistxattr support

Aditya Prakash Srivastava io-uring linux-fsdevel lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 3 repliesIn review
  2. v32 patches 3 repliesSuperseded
  3. v22 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches1 replySuperseded

Changes in v4 from the cover letter

- Split the tools/ UAPI header sync of pre-existing mainline opcodes into a separate precursor patch (Patch 1) (Suggested by Gabriel).
- Robustify io_fremovexattr_prep by initializing kname and kvalue to NULL to avoid potential garbage-pointer crashes in the io_xattr_cleanup path (Reported by Gabriel).
- Add strict validation to both fremovexattr and flistxattr to zero-check and reject all unused SQE fields (Reported by Gabriel).
- Reset ix->ctx.kname to NULL on error inside io_fremovexattr_prep.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tools: sync io_uring.h UAPI headerinclude/uapi/linux/io_uring.h tools/include/uapi/linux/io_uring.h+325 -173 replies
2/3fs: make file_listxattr and file_removexattr helpers non-staticfs/internal.h fs/xattr.c+3 -20 replies
3/3io_uring: add fremovexattr and flistxattr supportinclude/uapi/linux/io_uring.h io_uring/opdef.c io_uring/xattr.c +2 more+111 -00 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchJan Kara
1/3
2/3R-b
3/3

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

Read the v4 thread

Cover letter [PATCH v4 0/3] io_uring: add fremovexattr and flistxattr support

This series completes io_uring's FD-based xattr operations by adding support for:
- IORING_OP_FREMOVEXATTR
- IORING_OP_FLISTXATTR

This allows asynchronous xattr removal and listing.

New test cases have been added to the liburing test suite (test/xattr.c) and verified to pass. A separate userspace patch implementing the matching prep helpers, sanitizers, and test cases has been updated and submitted in parallel.

- Patch 1 syncs the tools/ directory's io_uring.h UAPI header to align it with kernel mainline prior to introducing the new opcodes.
- Patch 2 makes the necessary VFS-layer list/remove helpers non-static and declares them in fs/internal.h.
- Patch 3 implements the io_uring operational support (opcodes, opdefs, preparation, and issue handlers) and invokes these helpers.

Changes since v3:
- Split the tools/ UAPI header sync of pre-existing mainline opcodes into a separate precursor patch (Patch 1) (Suggested by Gabriel).
- Robustify io_fremovexattr_prep by initializing kname and kvalue to NULL to avoid potential garbage-pointer crashes in the io_xattr_cleanup path (Reported by Gabriel).
- Add strict validation to both fremovexattr and flistxattr to zero-check and reject all unused SQE fields (Reported by Gabriel).
- Reset ix->ctx.kname to NULL on error inside io_fremovexattr_prep.

Changes since v2:
- Revert unnecessary formatting changes to filename_listxattr in Patch 1 (now Patch 2).

Changes since v1:
- Omit path-based opcodes to prioritize optimal FD-based variants.
- Limit exported VFS helpers to only file_listxattr and file_removexattr.
- Rewrite standalone test program into a standard liburing testcase.

Aditya Prakash Srivastava (3):
tools: sync io_uring.h UAPI header
fs: make file_listxattr and file_removexattr helpers non-static
io_uring: add fremovexattr and flistxattr support

 fs/internal.h                       |   2 +
 fs/xattr.c                          |   3 +-
 include/uapi/linux/io_uring.h       |   2 +
 io_uring/opdef.c                    |  18 ++
 io_uring/xattr.c                    |  83 +++++++
 io_uring/xattr.h                    |   6 +
 tools/include/uapi/linux/io_uring.h | 342 ++++++++++++++++++++++++++--
 7 files changed, 438 insertions(+), 18 deletions(-)
Signature · 1 line
2.47.3