diff options
| author | Keith Busch <kbusch@kernel.org> | 2025-05-06 17:47:27 +0530 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-05-06 07:46:43 -0600 |
| commit | 02040353f4fedb823f011f27962325f328d0689f (patch) | |
| tree | fded45af2d44c243e48a09ea61ecd088a863f364 /io_uring/rw.c | |
| parent | c27683da6406031d47a65b344d04a40736490d95 (diff) | |
| download | lwn-02040353f4fedb823f011f27962325f328d0689f.tar.gz lwn-02040353f4fedb823f011f27962325f328d0689f.zip | |
io_uring: enable per-io write streams
Allow userspace to pass a per-I/O write stream in the SQE:
__u8 write_stream;
The __u8 type matches the size the filesystems and block layer support.
Application can query the supported values from the block devices
max_write_streams sysfs attribute. Unsupported values are ignored by
file operations that do not support write streams or rejected with an
error by those that support them.
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Nitesh Shetty <nj.shetty@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
Link: https://lore.kernel.org/r/20250506121732.8211-7-joshi.k@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rw.c')
| -rw-r--r-- | io_uring/rw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/rw.c b/io_uring/rw.c index 039e063f7091..b8389674a747 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -276,6 +276,7 @@ static int __io_prep_rw(struct io_kiocb *req, const struct io_uring_sqe *sqe, } rw->kiocb.dio_complete = NULL; rw->kiocb.ki_flags = 0; + rw->kiocb.ki_write_stream = READ_ONCE(sqe->write_stream); if (req->ctx->flags & IORING_SETUP_IOPOLL) rw->kiocb.ki_complete = io_complete_rw_iopoll; |
