io_uring: simplify struct io_uring_sqe layout
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 24 Jun 2021 14:09:59 +0000 (15:09 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 30 Jun 2021 20:15:39 +0000 (14:15 -0600)
Flatten struct io_uring_sqe, the last union is exactly 64B, so move them
out of union { struct { ... }}, and decrease __pad2 size.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/2e21ef7aed136293d654450bc3088973a8adc730.1624543113.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/uapi/linux/io_uring.h

index f1f9ac114b514f4788700a503b5aa2f4e4e6bbac..79126d5cd289d8bf2a2b5d4e49623b554236a270 100644 (file)
@@ -46,21 +46,17 @@ struct io_uring_sqe {
                __u32           unlink_flags;
        };
        __u64   user_data;      /* data to be passed back at completion time */
+       /* pack this to avoid bogus arm OABI complaints */
        union {
-               struct {
-                       /* pack this to avoid bogus arm OABI complaints */
-                       union {
-                               /* index into fixed buffers, if used */
-                               __u16   buf_index;
-                               /* for grouped buffer selection */
-                               __u16   buf_group;
-                       } __attribute__((packed));
-                       /* personality to use, if used */
-                       __u16   personality;
-                       __s32   splice_fd_in;
-               };
-               __u64   __pad2[3];
-       };
+               /* index into fixed buffers, if used */
+               __u16   buf_index;
+               /* for grouped buffer selection */
+               __u16   buf_group;
+       } __attribute__((packed));
+       /* personality to use, if used */
+       __u16   personality;
+       __s32   splice_fd_in;
+       __u64   __pad2[2];
 };
 
 enum {