[PATCHv3 01/11] nvmet: implement id ns for nvm command set
Christoph Hellwig
hch at lst.de
Tue Nov 5 21:38:00 PST 2024
On Tue, Nov 05, 2024 at 09:48:54AM -0800, Keith Busch wrote:
> From: Keith Busch <kbusch at kernel.org>
>
> Nothing to report here, but it's a mandatory identification for nvme
> 2.1.
Yeah, as of 2.1 the only field is LBSTM which we don't support.
>
> Signed-off-by: Keith Busch <kbusch at kernel.org>
> ---
> drivers/nvme/target/admin-cmd.c | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
> index 081f0473cd9ea..8d06dba42bcb3 100644
> --- a/drivers/nvme/target/admin-cmd.c
> +++ b/drivers/nvme/target/admin-cmd.c
> @@ -685,6 +685,20 @@ static void nvmet_execute_identify_ctrl_nvm(struct nvmet_req *req)
> nvmet_zero_sgl(req, 0, sizeof(struct nvme_id_ctrl_nvm)));
> }
>
> +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)
More information about the Linux-nvme
mailing list