[PATCH] NVMe: Skip namespaces with interleaved meta-data
Paul Grabinar
paul.grabinar at ranbarg.com
Wed Jan 28 12:50:24 PST 2015
On 28/01/15 15:11, Keith Busch wrote:
>
> Thanks for the info. NVMe doesn't appear to allow disabling metadata
> per-io except for a subset of formats. If that's correct, this driver
> would have to provide a valid protection buffer for all IO. Checking
> with committee comrades for clarification.
>
It is indeed a shame that they didn't define a null meta-data pointer as
meaning there is no meta-data. Maybe 1.3?
I got around this as follows.
Limit the maximum transfer so that all the meta-data fits into a single
page. As a side note, the protection information from the kernel needs
to be set to a maximum of one page anyway, as there is only a single PRP
entry for the meta-data and I don't think PRP lists are allowed here.
Allocate two 1 page DMA buffers per device, one will be used for reads
and one for writes.
Fill the write buffer with 0xFF, which means no protection information
is available.
When a read occurs and there is no kernel supplied protection
information, set the meta-data pointer to the read buffer.
When a write occurs and there is no kernel supplied protection
information, set the meta-data pointer to the write buffer. This will
write all the meta-data as 0xFF.
More information about the Linux-nvme
mailing list