Commit bc3a65e9 authored by Klaus Jensen's avatar Klaus Jensen
Browse files

hw/block/nvme: add metadata support


Add support for metadata in the form of extended logical blocks as well
as a separate buffer of data. The new `ms` nvme-ns device parameter
specifies the size of metadata per logical block in bytes. The `mset`
nvme-ns device parameter controls whether metadata is transfered as part
of an extended lba (set to '1') or in a separate buffer (set to '0',
the default).

Regardsless of the scheme chosen with `mset`, metadata is stored at the
end of the namespace backing block device. This requires the user
provided PRP/SGLs to be walked and "split" into data and metadata
scatter/gather lists if the extended logical block scheme is used, but
has the advantage of not breaking the deallocated blocks support.

Co-authored-by: default avatarGollu Appalanaidu <anaidu.gollu@samsung.com>
Signed-off-by: default avatarGollu Appalanaidu <anaidu.gollu@samsung.com>
Signed-off-by: default avatarKlaus Jensen <k.jensen@samsung.com>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
parent 3754df04
Showing with 620 additions and 81 deletions
+620 -81
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment