Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Nilay Shroff <nilay@linux.ibm.com>, linux-nvme@lists.infradead.org
Cc: dwagner@suse.de, hare@suse.com, kbusch@kernel.org, hch@lst.de,
	sagi@grimberg.me, axboe@kernel.dk, chaitanyak@nvidia.com,
	venkat88@linux.ibm.com, gjoyce@linux.ibm.com,
	wenxiong@linux.ibm.com
Subject: Re: [PATCHv4 6/8] nvme: export I/O failure count when no path is available via sysfs
Date: Thu, 2 Jul 2026 15:48:53 +0100	[thread overview]
Message-ID: <6cbf1ed3-9637-4c8e-a4f6-84a762161556@oracle.com> (raw)
In-Reply-To: <54c163fa-91a1-4535-aded-4beee698591a@linux.ibm.com>

On 02/07/2026 14:10, Nilay Shroff wrote:
> 
> The primary purpose of this attribute is to aid debugging. Under normal
> operation, the counter is expected to be zero most of the time because
> the namespace head is short-lived after all paths are removed. However,
> if there is a subtle bug in the namespace head reference counting logic
> that prevents it from being deleted, a non-zero value would remain
> visible under:
> 
> /sys/block/<nshead-dev>/diag/io_fail_no_available_path_count
> 
> And yes this attribute is writable (as all other diag attributes), only
> to allow users to reset the counter to zero and then observe subsequent
> events.

It's something minor, but it makes sense to me that we only allow users 
to reset the value to zero, like:

@@ -1249,7 +1249,7 @@ static ssize_t
io_fail_no_available_path_count_store(struct device *dev,
         struct nvme_ns_head *head = disk->private_data;

         err = kstrtoul(buf, 0, &fail_cnt);
-       if (err)
+       if (err || fail_cnt)
                 return -EINVAL;

         atomic_long_set(&head->io_fail_no_available_path_count, fail_cnt);



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

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-16 18:36 [PATCHv4 0/8] nvme: export additional diagnostic counters via sysfs Nilay Shroff
2026-05-16 18:36 ` [PATCHv4 1/8] nvme: add diag attribute group under sysfs Nilay Shroff
2026-05-16 18:36 ` [PATCHv4 2/8] nvme: export command retry count via sysfs Nilay Shroff
2026-05-16 18:36 ` [PATCHv4 3/8] nvme: export multipath failover " Nilay Shroff
2026-05-16 18:36 ` [PATCHv4 4/8] nvme: export command error counters " Nilay Shroff
2026-05-16 18:36 ` [PATCHv4 5/8] nvme: export I/O requeue count when no path is usable " Nilay Shroff
2026-05-16 18:36 ` [PATCHv4 6/8] nvme: export I/O failure count when no path is available " Nilay Shroff
2026-07-02  8:15   ` John Garry
2026-07-02 13:10     ` Nilay Shroff
2026-07-02 14:48       ` John Garry [this message]
2026-07-03  6:46         ` Nilay Shroff
2026-05-16 18:36 ` [PATCHv4 7/8] nvme: export controller reset event count " Nilay Shroff
2026-05-16 18:36 ` [PATCHv4 8/8] nvme: export controller reconnect " Nilay Shroff
2026-05-16 18:47 ` [PATCHv4 0/8] nvme: export additional diagnostic counters " Nilay Shroff
2026-05-25  9:12 ` Venkat Rao Bagalkote
2026-05-27 19:54 ` Keith Busch
2026-06-04  8:58 ` 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=6cbf1ed3-9637-4c8e-a4f6-84a762161556@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=chaitanyak@nvidia.com \
    --cc=dwagner@suse.de \
    --cc=gjoyce@linux.ibm.com \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=nilay@linux.ibm.com \
    --cc=sagi@grimberg.me \
    --cc=venkat88@linux.ibm.com \
    --cc=wenxiong@linux.ibm.com \
    /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