Commit 83ac678e authored by Daniel Wagner's avatar Daniel Wagner Committed by Keith Busch

nvme: rename ns attribute group

Drop the 'id' part of the attribute group name because we want to expose
non 'id' related attributes via the ns attribute group.
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarDaniel Wagner <dwagner@suse.de>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent d386aedc
...@@ -3671,7 +3671,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info) ...@@ -3671,7 +3671,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)
up_write(&ctrl->namespaces_rwsem); up_write(&ctrl->namespaces_rwsem);
nvme_get_ctrl(ctrl); nvme_get_ctrl(ctrl);
if (device_add_disk(ctrl->device, ns->disk, nvme_ns_id_attr_groups)) if (device_add_disk(ctrl->device, ns->disk, nvme_ns_attr_groups))
goto out_cleanup_ns_from_list; goto out_cleanup_ns_from_list;
if (!nvme_ns_head_multipath(ns->head)) if (!nvme_ns_head_multipath(ns->head))
......
...@@ -579,7 +579,7 @@ static void nvme_mpath_set_live(struct nvme_ns *ns) ...@@ -579,7 +579,7 @@ static void nvme_mpath_set_live(struct nvme_ns *ns)
*/ */
if (!test_and_set_bit(NVME_NSHEAD_DISK_LIVE, &head->flags)) { if (!test_and_set_bit(NVME_NSHEAD_DISK_LIVE, &head->flags)) {
rc = device_add_disk(&head->subsys->dev, head->disk, rc = device_add_disk(&head->subsys->dev, head->disk,
nvme_ns_id_attr_groups); nvme_ns_attr_groups);
if (rc) { if (rc) {
clear_bit(NVME_NSHEAD_DISK_LIVE, &ns->flags); clear_bit(NVME_NSHEAD_DISK_LIVE, &ns->flags);
return; return;
......
...@@ -865,7 +865,7 @@ int nvme_ns_head_chr_uring_cmd(struct io_uring_cmd *ioucmd, ...@@ -865,7 +865,7 @@ int nvme_ns_head_chr_uring_cmd(struct io_uring_cmd *ioucmd,
int nvme_getgeo(struct block_device *bdev, struct hd_geometry *geo); int nvme_getgeo(struct block_device *bdev, struct hd_geometry *geo);
int nvme_dev_uring_cmd(struct io_uring_cmd *ioucmd, unsigned int issue_flags); int nvme_dev_uring_cmd(struct io_uring_cmd *ioucmd, unsigned int issue_flags);
extern const struct attribute_group *nvme_ns_id_attr_groups[]; extern const struct attribute_group *nvme_ns_attr_groups[];
extern const struct pr_ops nvme_pr_ops; extern const struct pr_ops nvme_pr_ops;
extern const struct block_device_operations nvme_ns_head_ops; extern const struct block_device_operations nvme_ns_head_ops;
extern const struct attribute_group nvme_dev_attrs_group; extern const struct attribute_group nvme_dev_attrs_group;
......
...@@ -114,7 +114,7 @@ static ssize_t nsid_show(struct device *dev, struct device_attribute *attr, ...@@ -114,7 +114,7 @@ static ssize_t nsid_show(struct device *dev, struct device_attribute *attr,
} }
static DEVICE_ATTR_RO(nsid); static DEVICE_ATTR_RO(nsid);
static struct attribute *nvme_ns_id_attrs[] = { static struct attribute *nvme_ns_attrs[] = {
&dev_attr_wwid.attr, &dev_attr_wwid.attr,
&dev_attr_uuid.attr, &dev_attr_uuid.attr,
&dev_attr_nguid.attr, &dev_attr_nguid.attr,
...@@ -127,7 +127,7 @@ static struct attribute *nvme_ns_id_attrs[] = { ...@@ -127,7 +127,7 @@ static struct attribute *nvme_ns_id_attrs[] = {
NULL, NULL,
}; };
static umode_t nvme_ns_id_attrs_are_visible(struct kobject *kobj, static umode_t nvme_ns_attrs_are_visible(struct kobject *kobj,
struct attribute *a, int n) struct attribute *a, int n)
{ {
struct device *dev = container_of(kobj, struct device, kobj); struct device *dev = container_of(kobj, struct device, kobj);
...@@ -157,13 +157,13 @@ static umode_t nvme_ns_id_attrs_are_visible(struct kobject *kobj, ...@@ -157,13 +157,13 @@ static umode_t nvme_ns_id_attrs_are_visible(struct kobject *kobj,
return a->mode; return a->mode;
} }
static const struct attribute_group nvme_ns_id_attr_group = { static const struct attribute_group nvme_ns_attr_group = {
.attrs = nvme_ns_id_attrs, .attrs = nvme_ns_attrs,
.is_visible = nvme_ns_id_attrs_are_visible, .is_visible = nvme_ns_attrs_are_visible,
}; };
const struct attribute_group *nvme_ns_id_attr_groups[] = { const struct attribute_group *nvme_ns_attr_groups[] = {
&nvme_ns_id_attr_group, &nvme_ns_attr_group,
NULL, NULL,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment