mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
hw/nvme: store a pointer to the NvmeSubsystem in the NvmeNamespace
Each NvmeNamespace can be used by serveral controllers, but a NvmeNamespace can at most belong to a single NvmeSubsystem. Store a pointer to the NvmeSubsystem, if the namespace was realized with a NvmeSubsystem. Reviewed-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
parent
a555af1707
commit
534a93d3a0
2 changed files with 2 additions and 0 deletions
|
@ -561,6 +561,7 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp)
|
|||
if (!qdev_set_parent_bus(dev, &subsys->bus.parent_bus, errp)) {
|
||||
return;
|
||||
}
|
||||
ns->subsys = subsys;
|
||||
}
|
||||
|
||||
if (nvme_ns_setup(ns, errp)) {
|
||||
|
|
|
@ -167,6 +167,7 @@ typedef struct NvmeNamespace {
|
|||
int32_t nr_active_zones;
|
||||
|
||||
NvmeNamespaceParams params;
|
||||
NvmeSubsystem *subsys;
|
||||
|
||||
struct {
|
||||
uint32_t err_rec;
|
||||
|
|
Loading…
Reference in a new issue