[PATCHv3 01/11] nvmet: implement id ns for nvm command set

Keith Busch kbusch at kernel.org
Wed Nov 6 16:30:33 PST 2024


On Wed, Nov 06, 2024 at 06:38:00AM +0100, Christoph Hellwig wrote:
> On Tue, Nov 05, 2024 at 09:48:54AM -0800, Keith Busch wrote:
> > +static void nvme_execute_identify_ns_nvm(struct nvmet_req *req)
> > +{
> > +	u16 status;
> > +
> > +	status = nvmet_req_find_ns(req);
> > +	if (status)
> > +		goto out;
> > +
> > +	status = nvmet_copy_to_sgl(req, 0, ZERO_PAGE(0),
> > +				   NVME_IDENTIFY_DATA_SIZE);
> 
> Does this also need a check for the magic all-Fs nsid, which I think
> is not supported for the I/O command set specific identify namespace?
> (see the code іn the zns version)

If the command provides the broadcast NSID, nvmet_req_find_ns() will
fail, and target will return an error.

Since you mention it, it seems I've neglected the nvmet_req_find_ns()
BUG for the failure case used in an rcu context.



More information about the Linux-nvme mailing list