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:
parent
04e70bd4a0
commit
5ba895033b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue