Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ba89503 authored by Mikhail Skorzhinskii's avatar Mikhail Skorzhinskii Committed by Christoph Hellwig
Browse files

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: default avatarMikhail Skorzhinskii <mskorzhinskiy@solarflare.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 04e70bd4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);