Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Guixin Liu <kanie@linux.alibaba.com>
To: Nilay Shroff <nilay@linux.ibm.com>,
	Daniel Wagner <dwagner@suse.de>,
	John Garry <john.g.garry@oracle.com>,
	Keith Busch <kbusch@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH v3] nvme-multipath: expose path_state via sysfs
Date: Tue, 14 Jul 2026 15:02:20 +0800	[thread overview]
Message-ID: <f5e7ed68-7df0-4ae2-94f7-bde004f9b12f@linux.alibaba.com> (raw)
In-Reply-To: <f00962bb-630d-46d1-9dce-d09f1176111f@linux.alibaba.com>

Hi Keith, gently ping.

Best Regards,
Guixin Liu

在 2026/7/7 09:47, Guixin Liu 写道:
>
>
> 在 2026/6/24 21:21, Nilay Shroff 写道:
>> On 6/24/26 5:22 PM, Guixin Liu wrote:
>>>
>>>
>>> 在 2026/6/24 17:55, Daniel Wagner 写道:
>>>> On Wed, Jun 24, 2026 at 08:36:44AM +0100, John Garry wrote:
>>>>> On 24/06/2026 06:48, 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 the
>>>>>> current path state, including whether the path is enabled or 
>>>>>> disabled
>>>>>> with a specific reason.
>>>>>>
>>>>>> Factor the path disable checks from nvme_path_is_disabled() into 
>>>>>> a new
>>>>>> nvme_path_get_state() helper that returns an enum 
>>>>>> nvme_path_state. This
>>>>>> keeps the path selection logic and sysfs reporting in sync, so 
>>>>>> any future
>>>>>> updates to the path disable criteria are automatically reflected 
>>>>>> in the
>>>>>> sysfs output.
>>>>>>
>>>>>> Possible values:
>>>>>>     - "enabled (optimized)"     : ANA state is optimized
>>>>>>     - "enabled (non-optimized)" : ANA state is not optimized
>>>>>>     - "disabled (ctrl_down)"    : controller is not live
>>>>>>     - "disabled (ana_pending)"  : ANA state change pending
>>>>>>     - "disabled (ns_not_ready)" : namespace is not ready
>>>> I'd prefer to have a single string here instead of something we 
>>>> might need
>>>> to parse again. The sysfs docs says
>>>>
>>>>    Mixing types, expressing multiple lines of data, and doing fancy
>>>>    formatting of data is heavily frowned upon. Doing these things 
>>>> may get
>>>>    you publicly humiliated and your code rewritten without notice.
>>>>
>>>> Something like
>>>>
>>>>    - optimized
>>>>    - non-optimized
>>>>    - ctrl-down
>>>>    - ana-pending
>>>>    - ns-no-ready
>>> Would this be redundant with ana_state?
>>>
>>> Is this OK?
>>>      - enabled
>>>      - ctrl-down
>>>      - ana-pending
>>>      - ns-not-ready
>>>
>>>
>>> CC Keith, John, Nilay, what do you think?
>>
>> I tend to agree with Daniel about both mixing types and
>> reporting ana state values here as ana state is also reported
>> separately.
>>
>> The purpose of path_state is really to expose whether the path
>> is currently eligible for path selection and, if not, why.
>>
>> IMO, a simpler set of values which you suggested above
>> should be sufficient. But lets wait if Keith has any
>> other suggestion.
>>
>> Thanks
>> --Nilay
>>
> Hi Keith, would you have any suggestions on this?
>
> Best Regards,
> Guixin Liu
>



  reply	other threads:[~2026-07-14  7:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24  5:48 [PATCH v3] nvme-multipath: expose path_state via sysfs Guixin Liu
2026-06-24  7:36 ` John Garry
2026-06-24  9:55   ` Daniel Wagner
2026-06-24 11:52     ` Guixin Liu
2026-06-24 13:21       ` Nilay Shroff
2026-07-07  1:47         ` Guixin Liu
2026-07-14  7:02           ` Guixin Liu [this message]
2026-06-24 11:08   ` Guixin Liu

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=f5e7ed68-7df0-4ae2-94f7-bde004f9b12f@linux.alibaba.com \
    --to=kanie@linux.alibaba.com \
    --cc=axboe@kernel.dk \
    --cc=dwagner@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