Skip to content

Commit 5ba8950

Browse files
sf-rasmiChristoph Hellwig
authored andcommitted
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 <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 04e70bd commit 5ba8950

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/nvme/target/configfs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,10 @@ static struct config_group *nvmet_ns_make(struct config_group *group,
588588
goto out;
589589

590590
ret = -EINVAL;
591-
if (nsid == 0 || nsid == NVME_NSID_ALL)
591+
if (nsid == 0 || nsid == NVME_NSID_ALL) {
592+
pr_err("invalid nsid %#x", nsid);
592593
goto out;
594+
}
593595

594596
ret = -ENOMEM;
595597
ns = nvmet_ns_alloc(subsys, nsid);

0 commit comments

Comments
 (0)