Re: [PATCH] nvme: add 'kato' sysfs attribute
From: George, Martin <hidden>
Date: 2021-03-01 15:39:49
On Fri, 2021-02-26 at 08:52 +0100, Hannes Reinecke wrote:
quoted hunk ↗ jump to hunk
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 1d5fc8a6fd37..9ad23472ac15 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c@@ -3547,6 +3547,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, constchar *buf,@@ -3749,6 +3750,7 @@ static struct attribute *nvme_dev_attrs[] = { &dev_attr_ctrl_loss_tmo.attr, &dev_attr_fast_io_fail_tmo.attr, &dev_attr_reconnect_delay.attr, + &dev_attr_kato.attr, NULL };
This is helpful indeed. But looks like the actual kato value sent down the wire is ctrl->kato + NVME_KATO_GRACE. Wondering if that may end up confusing the end user. -Martin _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme