Skip to content

Commit 83ac678

Browse files
igawkeithbusch
authored andcommitted
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: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Daniel Wagner <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent d386aed commit 83ac678

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

drivers/nvme/host/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3671,7 +3671,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)
36713671
up_write(&ctrl->namespaces_rwsem);
36723672
nvme_get_ctrl(ctrl);
36733673

3674-
if (device_add_disk(ctrl->device, ns->disk, nvme_ns_id_attr_groups))
3674+
if (device_add_disk(ctrl->device, ns->disk, nvme_ns_attr_groups))
36753675
goto out_cleanup_ns_from_list;
36763676

36773677
if (!nvme_ns_head_multipath(ns->head))

drivers/nvme/host/multipath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ static void nvme_mpath_set_live(struct nvme_ns *ns)
579579
*/
580580
if (!test_and_set_bit(NVME_NSHEAD_DISK_LIVE, &head->flags)) {
581581
rc = device_add_disk(&head->subsys->dev, head->disk,
582-
nvme_ns_id_attr_groups);
582+
nvme_ns_attr_groups);
583583
if (rc) {
584584
clear_bit(NVME_NSHEAD_DISK_LIVE, &ns->flags);
585585
return;

drivers/nvme/host/nvme.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ int nvme_ns_head_chr_uring_cmd(struct io_uring_cmd *ioucmd,
865865
int nvme_getgeo(struct block_device *bdev, struct hd_geometry *geo);
866866
int nvme_dev_uring_cmd(struct io_uring_cmd *ioucmd, unsigned int issue_flags);
867867

868-
extern const struct attribute_group *nvme_ns_id_attr_groups[];
868+
extern const struct attribute_group *nvme_ns_attr_groups[];
869869
extern const struct pr_ops nvme_pr_ops;
870870
extern const struct block_device_operations nvme_ns_head_ops;
871871
extern const struct attribute_group nvme_dev_attrs_group;

drivers/nvme/host/sysfs.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static ssize_t nsid_show(struct device *dev, struct device_attribute *attr,
114114
}
115115
static DEVICE_ATTR_RO(nsid);
116116

117-
static struct attribute *nvme_ns_id_attrs[] = {
117+
static struct attribute *nvme_ns_attrs[] = {
118118
&dev_attr_wwid.attr,
119119
&dev_attr_uuid.attr,
120120
&dev_attr_nguid.attr,
@@ -127,7 +127,7 @@ static struct attribute *nvme_ns_id_attrs[] = {
127127
NULL,
128128
};
129129

130-
static umode_t nvme_ns_id_attrs_are_visible(struct kobject *kobj,
130+
static umode_t nvme_ns_attrs_are_visible(struct kobject *kobj,
131131
struct attribute *a, int n)
132132
{
133133
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,
157157
return a->mode;
158158
}
159159

160-
static const struct attribute_group nvme_ns_id_attr_group = {
161-
.attrs = nvme_ns_id_attrs,
162-
.is_visible = nvme_ns_id_attrs_are_visible,
160+
static const struct attribute_group nvme_ns_attr_group = {
161+
.attrs = nvme_ns_attrs,
162+
.is_visible = nvme_ns_attrs_are_visible,
163163
};
164164

165-
const struct attribute_group *nvme_ns_id_attr_groups[] = {
166-
&nvme_ns_id_attr_group,
165+
const struct attribute_group *nvme_ns_attr_groups[] = {
166+
&nvme_ns_attr_group,
167167
NULL,
168168
};
169169

0 commit comments

Comments
 (0)