summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorMikhail Skorzhinskii <mskorzhinskiy@solarflare.com>2019-07-04 11:01:48 +0300
committerChristoph Hellwig <hch@lst.de>2019-07-10 00:18:09 +0300
commit5ba895033b8e8257451e6f85e6e516c3b3ce1a68 (patch)
tree83ec93f9e080c9c4ca1df69afe8cbe942e92bfb9 /drivers/nvme
parent04e70bd4a0264a3d488a9eff6e116d7dc9a77967 (diff)
downloadlinux-5ba895033b8e8257451e6f85e6e516c3b3ce1a68.tar.xz
nvmet: print a hint while rejecting NSID 0 or 0xffffffff
Adding this hint for the sake of convenience. It was spotted that a few times people spent some time before understanding what is exactly wrong in configuration process. This should save a few time in such situations, especially for people who is not very confident with NVMe requirements. Signed-off-by: Mikhail Skorzhinskii <mskorzhinskiy@solarflare.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/target/configfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
index 08dd5af357f7..cd52b9f15376 100644
--- a/drivers/nvme/target/configfs.c
+++ b/drivers/nvme/target/configfs.c
@@ -588,8 +588,10 @@ static struct config_group *nvmet_ns_make(struct config_group *group,
goto out;
ret = -EINVAL;
- if (nsid == 0 || nsid == NVME_NSID_ALL)
+ if (nsid == 0 || nsid == NVME_NSID_ALL) {
+ pr_err("invalid nsid %#x", nsid);
goto out;
+ }
ret = -ENOMEM;
ns = nvmet_ns_alloc(subsys, nsid);