[PATCH V2 1/1] nvme: introduce generic per-namespace chardev
Javier González
javier.gonz at samsung.com
Thu Apr 8 11:26:25 BST 2021
On 08.04.2021 09:26, Christoph Hellwig wrote:
>On Thu, Apr 08, 2021 at 09:11:28AM +0200, Javier González wrote:
>> This would be useful for devices with metadata that is not supported by
>> the block layer, i.e., nvme_configure_metadata().
>
>You mean in nvme_update_disk_info? It would be the right thing to do,
>but back in the day the maintainers opted for the zero capacity
>block device hack. At least we now have the char device as well.
Yes. This path starts in nvme_update_ns_info() and part of it is
nvme_configure_metadata(), which might fail is the metadata is not
supported.
In this case, I believe we should still create the char device so that
any OME-specific NVMe device can still be used from user-space without
requiring SPDK and a PCI detach.
Does this sound good to you?
Regarding the current logic, I would not mind that the block device
still appears as a zero capacity too. We can think of removing this in
the future as this path becomes more stable. It requeries Kanchan's work
on io_uring to be usable for I/O.
More information about the Linux-nvme
mailing list