mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 02:54:58 -06:00
hw/nvme: add support for zoned random write area
Add support for TP 4076 ("Zoned Random Write Area"), v2021.08.23 ("Ratified"). This adds three new namespace parameters: "zoned.numzrwa" (number of zrwa resources, i.e. number of zones that can have a zrwa), "zoned.zrwas" (zrwa size in LBAs), "zoned.zrwafg" (granularity in LBAs for flushes). Reviewed-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
parent
25872031e1
commit
e321b4cdc2
5 changed files with 237 additions and 20 deletions
|
@ -114,6 +114,10 @@ typedef struct NvmeNamespaceParams {
|
|||
uint32_t max_active_zones;
|
||||
uint32_t max_open_zones;
|
||||
uint32_t zd_extension_size;
|
||||
|
||||
uint32_t numzrwa;
|
||||
uint64_t zrwas;
|
||||
uint64_t zrwafg;
|
||||
} NvmeNamespaceParams;
|
||||
|
||||
typedef struct NvmeNamespace {
|
||||
|
@ -130,6 +134,12 @@ typedef struct NvmeNamespace {
|
|||
uint16_t status;
|
||||
int attached;
|
||||
|
||||
struct {
|
||||
uint16_t zrwas;
|
||||
uint16_t zrwafg;
|
||||
uint32_t numzrwa;
|
||||
} zns;
|
||||
|
||||
QTAILQ_ENTRY(NvmeNamespace) entry;
|
||||
|
||||
NvmeIdNsZoned *id_ns_zoned;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue