mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
hw/nvme: add basic endurance group support
Add the mandatory Endurance Group identify data structures and log pages. For now, all namespaces in a subsystem belongs to a single Endurance Group. Reviewed-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
parent
534a93d3a0
commit
771dbc3ac4
4 changed files with 93 additions and 8 deletions
|
@ -592,6 +592,8 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp)
|
|||
if (subsys) {
|
||||
subsys->namespaces[nsid] = ns;
|
||||
|
||||
ns->id_ns.endgid = cpu_to_le16(0x1);
|
||||
|
||||
if (ns->params.detached) {
|
||||
return;
|
||||
}
|
||||
|
@ -607,6 +609,7 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp)
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
nvme_attach_ns(n, ns);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue