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>
This commit is contained in:
Mikhail Skorzhinskii 2019-07-04 10:01:48 +02:00 committed by Christoph Hellwig
parent 04e70bd4a0
commit 5ba895033b
1 changed files with 3 additions and 1 deletions

View File

@ -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);