summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2019-09-24 14:22:08 -0700
committerSagi Grimberg <sagi@grimberg.me>2019-09-25 13:01:44 -0700
commit2b1ff255d2d043aa4e6d62f50c478b283f9943ac (patch)
treede3bd0639425e4acca551f2d27ac82445a9df30c /drivers/nvme
parent65e68edce0db433aa0c2b26d7dc14fbbbeb89fbb (diff)
downloadlinux-stable-2b1ff255d2d043aa4e6d62f50c478b283f9943ac.tar.gz
linux-stable-2b1ff255d2d043aa4e6d62f50c478b283f9943ac.tar.bz2
linux-stable-2b1ff255d2d043aa4e6d62f50c478b283f9943ac.zip
nvme: Add ctrl attributes for queue_count and sqsize
Current controller interrogation requires a lot of guesswork on how many io queues were created and what the io sq size is. The numbers are dependent upon core/fabric defaults, connect arguments, and target responses. Add sysfs attributes for queue_count and sqsize. Signed-off-by: James Smart <jsmart2021@gmail.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 87ed437a46b8..fd7dea36c3b6 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3135,6 +3135,8 @@ static DEVICE_ATTR(field, S_IRUGO, field##_show, NULL);
nvme_show_int_function(cntlid);
nvme_show_int_function(numa_node);
+nvme_show_int_function(queue_count);
+nvme_show_int_function(sqsize);
static ssize_t nvme_sysfs_delete(struct device *dev,
struct device_attribute *attr, const char *buf,
@@ -3215,6 +3217,8 @@ static struct attribute *nvme_dev_attrs[] = {
&dev_attr_address.attr,
&dev_attr_state.attr,
&dev_attr_numa_node.attr,
+ &dev_attr_queue_count.attr,
+ &dev_attr_sqsize.attr,
NULL
};