Merge tag 'for-5.19/io_uring-xattr-2022-05-22' of git://git.kernel.dk/linux-block
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 23 May 2022 19:30:30 +0000 (12:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 23 May 2022 19:30:30 +0000 (12:30 -0700)
Pull io_uring xattr support from Jens Axboe:
 "Support for the xattr variants"

* tag 'for-5.19/io_uring-xattr-2022-05-22' of git://git.kernel.dk/linux-block:
  io_uring: cleanup error-handling around io_req_complete
  io_uring: fix trace for reduced sqe padding
  io_uring: add fgetxattr and getxattr support
  io_uring: add fsetxattr and setxattr support
  fs: split off do_getxattr from getxattr
  fs: split off setxattr_copy and do_setxattr function from setxattr

1  2 
fs/io_uring.c
include/trace/events/io_uring.h
include/uapi/linux/io_uring.h

diff --cc fs/io_uring.c
@@@ -1279,8 -1218,15 +1287,16 @@@ static const struct io_op_def io_op_def
        [IORING_OP_LINKAT] = {},
        [IORING_OP_MSG_RING] = {
                .needs_file             = 1,
 +              .iopoll                 = 1,
        },
+       [IORING_OP_FSETXATTR] = {
+               .needs_file = 1
+       },
+       [IORING_OP_SETXATTR] = {},
+       [IORING_OP_FGETXATTR] = {
+               .needs_file = 1
+       },
+       [IORING_OP_GETXATTR] = {},
  };
  
  /* requests with any of those set should undergo io_disarm_next() */
Simple merge
@@@ -60,18 -61,10 +61,19 @@@ struct io_uring_sqe 
                __s32   splice_fd_in;
                __u32   file_index;
        };
-       __u64   __pad2[2];
+       __u64   addr3;
+       __u64   __pad2[1];
  };
  
 +/*
 + * If sqe->file_index is set to this for opcodes that instantiate a new
 + * direct descriptor (like openat/openat2/accept), then io_uring will allocate
 + * an available direct descriptor instead of having the application pass one
 + * in. The picked direct descriptor will be returned in cqe->res, or -ENFILE
 + * if the space is full.
 + */
 +#define IORING_FILE_INDEX_ALLOC               (~0U)
 +
  enum {
        IOSQE_FIXED_FILE_BIT,
        IOSQE_IO_DRAIN_BIT,