io_uring/rw: don't mask in f_iocb_flags
authorJens Axboe <axboe@kernel.dk>
Tue, 17 Dec 2024 14:44:25 +0000 (07:44 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 17 Dec 2024 15:03:53 +0000 (08:03 -0700)
commit7b7bf14f00521ce9adcc7df4df66bc6d4f31a054
tree9d5f3fa2fcbef9622ccfb733713ce39c60a1cf8d
parentcd7f9fee711c9ca4b909ffaadcac0302358db841
io_uring/rw: don't mask in f_iocb_flags

A previous commit changed overwriting kiocb->ki_flags with
->f_iocb_flags with masking it in. This breaks for retry situations,
where we don't necessarily want to retain previously set flags, like
IOCB_NOWAIT.

The use case needs IOCB_HAS_METADATA to be persistent, but the change
makes all flags persistent, which is an issue. Add a request flag to
track whether the request has metadata or not, as that is persistent
across issues.

Fixes: 4dde0cc4459c ("io_uring: introduce attributes for read/write and PI support")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
io_uring/rw.c