From: Guixin Liu <kanie@linux.alibaba.com>
To: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Nilay Shroff <nilay@linux.ibm.com>,
Daniel Wagner <dwagner@suse.de>,
John Garry <john.g.garry@oracle.com>,
Hannes Reinecke <hare@suse.de>
Cc: linux-nvme@lists.infradead.org
Subject: [PATCH v5 0/1] nvme-multipath: expose path_state via sysfs
Date: Sun, 20 Sep 2026 10:52:13 +0800 [thread overview]
Message-ID: <20260920025214.3089533-1-kanie@linux.alibaba.com> (raw)
This series adds a read-only "path_state" sysfs attribute to each NVMe
multipath path namespace device (/sys/block/nvmeXcYnZ/path_state), giving
userspace visibility into whether a path is currently usable for I/O and,
if not, the reason it is disabled.
Today users have to piece this together from the controller state and
various namespace flags. The new attribute reports the path selection
state directly, and is kept in sync with the path selection logic by
sharing a single nvme_path_get_state() helper.
Changes since v4:
- Merge the two patches into one patch. (Christoph Hellwig)
- Change the new ABI's KernelVersion from 7.2 to 7.4.
Changes since v3:
- Use single-token sysfs values ("enabled", "ctrl-down", "ana-pending",
"ns-not-ready") instead of the composite "disabled (reason)" and
"enabled (optimized)/(non-optimized)" strings, following the sysfs
convention of exporting one simple value per attribute.
- Drop the "enabled (optimized)" vs "enabled (non-optimized)"
distinction; the ANA access state is already exposed through the
existing per-path ana_state attribute.
- Add a second patch documenting path_state in the stable NVMe sysfs
ABI (Documentation/ABI/stable/sysfs-nvme).
Changes since v2:
- Factor path disable checks into nvme_path_get_state() helper returning
enum nvme_path_state, and rebuild nvme_path_is_disabled() on top of it
to keep path selection logic and sysfs reporting in sync. (Nilay Shroff)
- Distinguish "enabled (optimized)" vs "enabled (non-optimized)" based on
ANA state. (Keith Busch)
Changes since v1:
- Show specific disabled reason instead of just "disabled":
"disabled (ctrl_down)", "disabled (ana_pending)",
"disabled (ns_not_ready)". (Nilay Shroff)
Guixin Liu (1):
nvme-multipath: expose path_state via sysfs
Documentation/ABI/stable/sysfs-nvme | 21 +++++++++++++
drivers/nvme/host/multipath.c | 47 +++++++++++++++++++++++++----
drivers/nvme/host/nvme.h | 1 +
drivers/nvme/host/sysfs.c | 4 ++-
4 files changed, 66 insertions(+), 7 deletions(-)
--
2.43.7
next reply other threads:[~2026-09-20 2:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 2:52 Guixin Liu [this message]
2026-09-20 2:52 ` [PATCH v5 1/1] nvme-multipath: expose path_state via sysfs Guixin Liu
2026-09-20 10:07 ` Nilay Shroff
2026-09-21 6:50 ` Christoph Hellwig
2026-09-21 9:03 ` Hannes Reinecke
2026-09-22 15:03 ` Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260920025214.3089533-1-kanie@linux.alibaba.com \
--to=kanie@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=john.g.garry@oracle.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=nilay@linux.ibm.com \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox