qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] hw/block/nvme: support ANA
@ 2021-02-14 11:23 Minwoo Im
  2021-02-14 11:23 ` [PATCH 1/2] hw/block/nvme: support Asymmetric Namespace Access(ANA) Minwoo Im
  2021-02-14 11:24 ` [PATCH 2/2] hw/block/nvme: add 'nvme_ana_inject_state' HMP command Minwoo Im
  0 siblings, 2 replies; 4+ messages in thread
From: Minwoo Im @ 2021-02-14 11:23 UTC (permalink / raw)
  To: qemu-devel, qemu-block
  Cc: Keith Busch, Klaus Jensen, Minwoo Im, Kevin Wolf, Max Reitz

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(-)

-- 
2.17.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-26 13:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-14 11:23 [PATCH 0/2] hw/block/nvme: support ANA Minwoo Im
2021-02-14 11:23 ` [PATCH 1/2] hw/block/nvme: support Asymmetric Namespace Access(ANA) Minwoo Im
2021-02-14 11:24 ` [PATCH 2/2] hw/block/nvme: add 'nvme_ana_inject_state' HMP command Minwoo Im
2021-02-26 13:16   ` Minwoo Im

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).