Skip to content

Commit

Permalink
nvmet: prefix version configfs file with attr
Browse files Browse the repository at this point in the history
The NVMe target's attribute files need an attr prefix in order to have
nvmetcli recognize them. Add this attribute.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Johannes Thumshirn authored and Jens Axboe committed Jul 20, 2017
1 parent b00c9b7 commit 41528f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/nvme/target/configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ static ssize_t nvmet_subsys_attr_allow_any_host_store(struct config_item *item,

CONFIGFS_ATTR(nvmet_subsys_, attr_allow_any_host);

static ssize_t nvmet_subsys_version_show(struct config_item *item,
static ssize_t nvmet_subsys_attr_version_show(struct config_item *item,
char *page)
{
struct nvmet_subsys *subsys = to_subsys(item);
Expand All @@ -666,7 +666,7 @@ static ssize_t nvmet_subsys_version_show(struct config_item *item,
(int)NVME_MINOR(subsys->ver));
}

static ssize_t nvmet_subsys_version_store(struct config_item *item,
static ssize_t nvmet_subsys_attr_version_store(struct config_item *item,
const char *page, size_t count)
{
struct nvmet_subsys *subsys = to_subsys(item);
Expand All @@ -684,11 +684,11 @@ static ssize_t nvmet_subsys_version_store(struct config_item *item,

return count;
}
CONFIGFS_ATTR(nvmet_subsys_, version);
CONFIGFS_ATTR(nvmet_subsys_, attr_version);

static struct configfs_attribute *nvmet_subsys_attrs[] = {
&nvmet_subsys_attr_attr_allow_any_host,
&nvmet_subsys_attr_version,
&nvmet_subsys_attr_attr_version,
NULL,
};

Expand Down

0 comments on commit 41528f8

Please sign in to comment.