hw/block/nvme: support ANA
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | hw/block/nvme: support Asymmetric Namespace Access(ANA)hw/ hw/ hw/ +4 more | +260 | 0 replies | |
| 2/2 | hw/block/nvme: add 'nvme_ana_inject_state' HMP commandhmp-commands.hx hw/ hw/ +2 more | +109 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] hw/block/nvme: support ANA
Hello,
This series is to support Asymmetric Namespace Access(ANA).
ana parameter to the nvme-subsys device will turn all the controllers in the subsystem to support multipath I/O with ANA. Once ana is enabled, nvme-ns device can have ana.grpid for the ANA group ID. All this information will be reported as a log information via Get Log Page command of ANA page.
But, this is just for ANA state considered, not including any transitions for ANA states between controllers and namespaces. Therefore, the second patch introduced an interface to transite the ANA state for a given ANA group via HMP command. nvme_ana_inject_state command will inject a given state to the given ANA group.
The following example breaks the path to the namespace(nsid=1) by chainging the ANA group(ana.grpid=1) state to INACCESSIBLE. Once this state is injected by HMP interface, Asynchronous Event Notifier(AEN) will be reported to the host for ANA change. Then host will read the log page again and find a path to the namespace(nsid=1) not through the nvme0 controller: nvme controller will be taken. Then all the I/O heading to namespace(nsid=1) will be routed to the nvme1 controller.
Example:
NVMe subsystem topology
-device nvme-subsys,id=subsys0,ana=true \
-device nvme,serial=foo,id=nvme0,subsys=subsys0 \
-device nvme,serial=bar,id=nvme1,subsys=subsys0 \
-device nvme-ns,id=ns1,drive=drv10,nsid=1,subsys=subsys0,ana.grpid=1 \
-device nvme-ns,id=ns2,drive=drv11,nsid=2,subsys=subsys0,ana.grpid=2 \ANA state transition (HMP command)
(qemu) nvme_ana_inject_state nvme0 1 inaccessible
nvme0: ANA state inaccessible(3) injected
Thanks,
Minwoo Im (2):
hw/block/nvme: support Asymmetric Namespace Access(ANA) hw/block/nvme: add 'nvme_ana_inject_state' HMP command
hmp-commands.hx | 13 +++ hw/block/nvme-ns.c | 26 +++++ hw/block/nvme-ns.h | 3 + hw/block/nvme-subsys.c | 6 ++ hw/block/nvme-subsys.h | 6 ++ hw/block/nvme.c | 240 ++++++++++++++++++++++++++++++++++++++++- hw/block/nvme.h | 26 +++++ include/block/nvme.h | 51 ++++++++- include/monitor/hmp.h | 1 + 9 files changed, 369 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.1