All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <keith.busch@wdc.com>,
	Sagi Grimberg <sagi@grimberg.me>, Daniel Wagner <dwagner@suse.de>,
	linux-nvme@lists.infradead.org, Hannes Reinecke <hare@suse.de>,
	Chao Leng <lengchao@huawei.com>
Subject: [PATCH 3/3] nvme: add 'kato' sysfs attribute
Date: Tue,  2 Mar 2021 10:26:44 +0100	[thread overview]
Message-ID: <20210302092644.80701-4-hare@suse.de> (raw)
In-Reply-To: <20210302092644.80701-1-hare@suse.de>

Add a 'kato' controller sysfs attribute to display the current
keep-alive timeout value (if any). This allows userspace to identify
persistent discovery controllers, as these will have a non-zero
KATO value.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/host/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 6d096d41a82f..4f92c5035045 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3554,6 +3554,7 @@ nvme_show_int_function(cntlid);
 nvme_show_int_function(numa_node);
 nvme_show_int_function(queue_count);
 nvme_show_int_function(sqsize);
+nvme_show_int_function(kato);
 
 static ssize_t nvme_sysfs_delete(struct device *dev,
 				struct device_attribute *attr, const char *buf,
@@ -3720,6 +3721,7 @@ static struct attribute *nvme_dev_attrs[] = {
 	&dev_attr_hostid.attr,
 	&dev_attr_ctrl_loss_tmo.attr,
 	&dev_attr_reconnect_delay.attr,
+	&dev_attr_kato.attr,
 	NULL
 };
 
-- 
2.29.2


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  parent reply	other threads:[~2021-03-02  9:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02  9:26 [PATCHv2 0/3] nvme: sanitize KATO handling Hannes Reinecke
2021-03-02  9:26 ` [PATCH 1/3] nvme: fixup kato deadlock Hannes Reinecke
2021-03-03  8:42   ` Christoph Hellwig
2021-03-03 12:01     ` Hannes Reinecke
2021-03-03 12:35       ` Christoph Hellwig
2021-03-03 13:11         ` Hannes Reinecke
2021-03-03 14:23           ` Hannes Reinecke
2021-03-04  8:02             ` Christoph Hellwig
2021-03-04  8:56               ` Hannes Reinecke
2021-03-02  9:26 ` [PATCH 2/3] nvme: sanitize KATO setting Hannes Reinecke
2021-03-03  8:53   ` Chao Leng
2021-03-03 12:40     ` Christoph Hellwig
2021-03-05 20:38   ` Sagi Grimberg
2021-03-08 13:11   ` Max Gurtovoy
2021-03-08 13:54     ` Hannes Reinecke
2021-03-02  9:26 ` Hannes Reinecke [this message]
2021-03-05 20:38   ` [PATCH 3/3] nvme: add 'kato' sysfs attribute Sagi Grimberg
2021-03-08 13:06   ` Max Gurtovoy

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=20210302092644.80701-4-hare@suse.de \
    --to=hare@suse.de \
    --cc=dwagner@suse.de \
    --cc=hch@lst.de \
    --cc=keith.busch@wdc.com \
    --cc=lengchao@huawei.com \
    --cc=linux-nvme@lists.infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.