diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2026-02-09 14:31:22 +0000 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-02-10 05:26:15 -0700 |
| commit | 0efc331d78b043b9d8477c64e279058062d36a0b (patch) | |
| tree | 06090933429315f04bffab25f1a785e9f1ac3141 /io_uring/rsrc.h | |
| parent | 417d029dc412c1028bce3d4685700332c0539a95 (diff) | |
io_uring/rsrc: replace reg buffer bit field with flags
I'll need a flag in the registered buffer struct for dmabuf work, and
it'll be more convenient to have a flags field rather than bit fields,
especially for io_mapped_ubuf initialisation.
We might want to add more flags in the future as well. For example, it
might be useful for debugging and potentially optimisations to split out
a flag indicating the shape of the buffer to gate iov_iter_advance()
walks vs bit/mask arithmetics. It can also be combined with the
direction mask field.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rsrc.h')
| -rw-r--r-- | io_uring/rsrc.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/io_uring/rsrc.h b/io_uring/rsrc.h index 4a5db2ad1af2..cff0f8834c35 100644 --- a/io_uring/rsrc.h +++ b/io_uring/rsrc.h @@ -28,6 +28,10 @@ enum { IO_IMU_SOURCE = 1 << ITER_SOURCE, }; +enum { + IO_REGBUF_F_KBUF = 1, +}; + struct io_mapped_ubuf { u64 ubuf; unsigned int len; @@ -37,7 +41,7 @@ struct io_mapped_ubuf { unsigned long acct_pages; void (*release)(void *); void *priv; - bool is_kbuf; + u8 flags; u8 dir; struct bio_vec bvec[] __counted_by(nr_bvecs); }; |
