From: Mikhail Skorzhinskii Date: Thu, 4 Jul 2019 08:01:48 +0000 (+0200) Subject: nvmet: print a hint while rejecting NSID 0 or 0xffffffff X-Git-Tag: v5.4-rc1~551^2~8^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ba895033b8e8257451e6f85e6e516c3b3ce1a68;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c index 08dd5af..cd52b9f 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);