linux-kernelorg-stable/drivers/block
Caleb Sander Mateos 763ff02ce2 ublk: allow UBLK_IO_(UN)REGISTER_IO_BUF on any task
Currently, UBLK_IO_REGISTER_IO_BUF and UBLK_IO_UNREGISTER_IO_BUF are
only permitted on the ublk_io's daemon task. But this restriction is
unnecessary. ublk_register_io_buf() calls __ublk_check_and_get_req() to
look up the request from the tagset and atomically take a reference on
the request without accessing the ublk_io. ublk_unregister_io_buf()
doesn't use the q_id or tag at all.

So allow these opcodes even on tasks other than io->task.

Handle UBLK_IO_UNREGISTER_IO_BUF before obtaining the ubq and io since
the buffer index being unregistered is not necessarily related to the
specified q_id and tag.

Add a feature flag UBLK_F_BUF_REG_OFF_DAEMON that userspace can use to
determine whether the kernel supports off-daemon buffer registration.

Suggested-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250620151008.3976463-10-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-06-30 20:13:42 -06:00
..
aoe block-6.16-20250619 2025-06-19 23:29:35 -07:00
drbd treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
mtip32xx mtip32xx: Remove unnecessary pcim_iounmap_regions() calls 2025-04-09 14:22:25 -05:00
null_blk null_blk: Use strscpy() instead of strscpy_pad() in null_add_dev() 2025-04-11 07:10:46 -06:00
rnbd rnbd-srv: use bio_add_virt_nofail 2025-05-07 07:31:07 -06:00
xen-blkback xen/blkback: convert timeouts to secs_to_jiffies() 2025-01-12 20:21:03 -08:00
zram zram: support deflate-specific params 2025-05-31 22:46:07 -07:00
Kconfig Documentation: Document the new zoned loop block device driver 2025-05-01 17:03:56 -06:00
Makefile block: new zoned loop block device driver 2025-05-01 17:03:56 -06:00
amiflop.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
ataflop.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
brd.c brd: avoid extra xarray lookups on first write 2025-05-14 05:44:13 -06:00
floppy.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
loop.c loop: move lo_set_size() out of queue freeze 2025-06-11 06:41:45 -06:00
n64cart.c block: move the nonrot flag to queue_limits 2024-06-19 07:58:28 -06:00
nbd.c block: force noio scope in blk_mq_freeze_queue 2025-01-31 07:20:08 -07:00
pktcdvd.c block: remove the q argument from blk_rq_map_kern 2025-05-07 07:31:07 -06:00
ps3disk.c ps3disk: Do not use dev->bounce_size before it is set 2025-01-03 11:44:25 -07:00
ps3vram.c block: pass a queue_limits argument to blk_alloc_disk 2024-02-19 16:58:23 -07:00
rbd.c block: force noio scope in blk_mq_freeze_queue 2025-01-31 07:20:08 -07:00
rbd_types.h
rnull.rs rust: module: introduce `authors` key 2025-03-10 15:12:17 +01:00
sunvdc.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
swim.c block: remove BLK_MQ_F_SHOULD_MERGE 2024-12-23 08:17:23 -07:00
swim3.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
swim_asm.S
ublk_drv.c ublk: allow UBLK_IO_(UN)REGISTER_IO_BUF on any task 2025-06-30 20:13:42 -06:00
virtio_blk.c block: remove the q argument from blk_rq_map_kern 2025-05-07 07:31:07 -06:00
xen-blkfront.c block: remove unused parameter 'q' parameter in __blk_rq_map_sg() 2025-03-13 05:46:19 -06:00
z2ram.c block: remove BLK_MQ_F_SHOULD_MERGE 2024-12-23 08:17:23 -07:00
zloop.c block: new zoned loop block device driver 2025-05-01 17:03:56 -06:00