mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
io_uring/rsrc: rename and export IO_IMU_DEST / IO_IMU_SOURCE
Rename IO_IMU_DEST and IO_IMU_SOURCE to IO_BUF_DEST and IO_BUF_SOURCE and export it so subsystems may use it. This is needed by the io_buffer_register_bvec() path for callers who may need the buffer to be both readable and writable. Signed-off-by: Joanne Koong <joannelkoong@gmail.com> Link: https://patch.msgid.link/20260612184840.4058966-5-joannelkoong@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
bd62a2cfff
commit
95961b72c5
|
|
@ -44,6 +44,11 @@ enum io_uring_cmd_flags {
|
||||||
IO_URING_F_COMPAT = (1 << 12),
|
IO_URING_F_COMPAT = (1 << 12),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
IO_BUF_DEST = 1 << ITER_DEST,
|
||||||
|
IO_BUF_SOURCE = 1 << ITER_SOURCE,
|
||||||
|
};
|
||||||
|
|
||||||
struct iou_loop_params;
|
struct iou_loop_params;
|
||||||
|
|
||||||
struct io_wq_work_node {
|
struct io_wq_work_node {
|
||||||
|
|
|
||||||
|
|
@ -3245,7 +3245,7 @@ static int __init io_uring_init(void)
|
||||||
io_uring_optable_init();
|
io_uring_optable_init();
|
||||||
|
|
||||||
/* imu->dir is u8 */
|
/* imu->dir is u8 */
|
||||||
BUILD_BUG_ON((IO_IMU_DEST | IO_IMU_SOURCE) > U8_MAX);
|
BUILD_BUG_ON((IO_BUF_DEST | IO_BUF_SOURCE) > U8_MAX);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allow user copy in the per-command field, which starts after the
|
* Allow user copy in the per-command field, which starts after the
|
||||||
|
|
|
||||||
|
|
@ -912,7 +912,7 @@ static struct io_rsrc_node *io_sqe_buffer_register(struct io_ring_ctx *ctx,
|
||||||
imu->release = io_release_ubuf;
|
imu->release = io_release_ubuf;
|
||||||
imu->priv = imu;
|
imu->priv = imu;
|
||||||
imu->flags = 0;
|
imu->flags = 0;
|
||||||
imu->dir = IO_IMU_DEST | IO_IMU_SOURCE;
|
imu->dir = IO_BUF_DEST | IO_BUF_SOURCE;
|
||||||
if (coalesced)
|
if (coalesced)
|
||||||
imu->folio_shift = data.folio_shift;
|
imu->folio_shift = data.folio_shift;
|
||||||
refcount_set(&imu->refs, 1);
|
refcount_set(&imu->refs, 1);
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,6 @@ struct io_rsrc_node {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
|
||||||
IO_IMU_DEST = 1 << ITER_DEST,
|
|
||||||
IO_IMU_SOURCE = 1 << ITER_SOURCE,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
IO_REGBUF_F_KBUF = 1,
|
IO_REGBUF_F_KBUF = 1,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user