[PATCH] nvme-multipath: expose path_state via sysfs

Daniel Wagner dwagner at suse.de
Thu Jun 18 06:02:31 PDT 2026


On Wed, Jun 17, 2026 at 08:15:43PM +0800, Guixin Liu wrote:
> Add a read-only "path_state" sysfs attribute to each NVMe path namespace
> device (/sys/class/nvme/nvmeX/nvmeXcYnZ/path_state) that exposes whether
> the path is currently enabled or disabled.
> 
> The attribute reflects the result of nvme_path_is_disabled(), showing
> "disabled" when the controller is not live/deleting, the namespace has
> an ANA state change pending, or the namespace is not ready. Otherwise
> it shows "enabled".
> 
> This gives userspace visibility into the multipath path selection state
> without requiring users to piece together controller state and namespace
> flags manually.

The ctrl state is already exposed to the sysfs. What's the use case for
this sysfs entry?



More information about the Linux-nvme mailing list