[PATCH v4 3/3] nvme/ioctl: move fixed buffer lookup to nvme_uring_cmd_io()
Kanchan Joshi
joshi.k at samsung.com
Wed Apr 2 06:21:11 PDT 2025
On 3/31/2025 8:06 PM, Keith Busch wrote:
> On Mon, Mar 31, 2025 at 12:16:58PM +0530, Kanchan Joshi wrote:
>> On 3/28/2025 9:16 PM, Caleb Sander Mateos wrote:
>>> For NVMe passthru operations with fixed buffers, the fixed buffer lookup
>>> happens in io_uring_cmd_import_fixed(). But nvme_uring_cmd_io() can
>>> return -EAGAIN first from nvme_alloc_user_request() if all tags in the
>>> tag set are in use. This ordering difference is observable when using
>>> UBLK_U_IO_{,UN}REGISTER_IO_BUF SQEs to modify the fixed buffer table. If
>>> the NVMe passthru operation is followed by UBLK_U_IO_UNREGISTER_IO_BUF
>>> to unregister the fixed buffer and the NVMe passthru goes async, the
>>> fixed buffer lookup will fail because it happens after the unregister.
>> while the patch looks fine, I wonder what setup is required to
>> trigger/test this. Given that io_uring NVMe passthru is on the char
>> device node, and ublk does not take char device as the backing file.
>> Care to explain?
> Not sure I understand the question. A ublk daemon can use anything it
> wants on the backend. Are you just referring to the public ublksrv
> implementation? That's not used here, if that's what you mean.
got it, I did not think beyond public ublksrv.
The userspace block over nvme char-device sounds interesting.
More information about the Linux-nvme
mailing list