io_uring: extend io_uring_sqe flags bits
authorJens Axboe <axboe@kernel.dk>
Thu, 31 Oct 2024 19:41:20 +0000 (13:41 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 1 Nov 2024 15:11:46 +0000 (09:11 -0600)
commit62db18ef7237fef8c03edb11965d083d439c1a2b
treebc7c7d363039d0b3a9863d36887b79dae622d284
parentc50d111b046a09edb09c5d8ca097fcab6aaaa44c
io_uring: extend io_uring_sqe flags bits

In hindsight everything is clearer, but it probably should've been known
that 8 bits of ->flags would run out sooner than later. Rather than
gobble up the last bit for a random use case, add a bit that controls
whether or not ->personality is used as a flags2 argument. If that is
the case, then there's a new IOSQE2_PERSONALITY flag that tells io_uring
which personality field to read.

While this isn't the prettiest, it does allow extending with 15 extra
flags, and retains being able to use personality with any kind of
command. The exception is uring cmd, where personality2 will overlap
with the space set aside for SQE128. If they really need that, then that
would have to be done via a uring cmd flag.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
include/trace/events/io_uring.h
include/uapi/linux/io_uring.h
io_uring/filetable.h
io_uring/io_uring.c
io_uring/uring_cmd.c