Files
linux/include/uapi/linux
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
..
2024-07-31 13:56:00 +02:00
2024-04-15 13:42:38 +02:00
2025-02-08 15:16:29 +00:00
2025-01-13 07:36:29 -08:00
2025-02-05 13:22:04 +09:00
2024-06-11 12:57:49 -05:00
2025-02-12 02:29:30 +00:00
2025-05-03 12:02:09 +02:00
2024-05-07 01:35:57 +02:00
2024-08-29 10:39:37 +02:00
2024-04-01 10:49:28 +01:00
2024-08-26 09:37:23 -07:00
2024-06-01 07:28:21 +02:00
2024-09-01 20:26:05 -07:00
2025-04-17 11:09:10 +02:00
2024-08-19 22:36:26 -04:00
2023-12-15 17:01:30 +01:00
2024-09-06 08:31:40 -06:00
2025-05-13 11:12:48 +02:00
2024-08-12 17:50:34 -07:00
2023-11-28 19:05:16 +00:00
2025-01-08 13:18:11 +01:00
2025-04-17 12:30:02 +02:00
2023-12-20 19:26:31 -05:00
2025-02-25 18:14:03 -08:00
2025-05-21 13:41:03 +02:00
2025-04-17 12:30:02 +02:00
2023-12-29 11:58:24 -08:00
2025-04-14 09:51:31 -04:00
2025-05-27 10:27:54 -04:00