more nvmet Identify fixups
Chaitanya Kulkarni
chaitanyak at nvidia.com
Thu Mar 16 00:18:27 PDT 2023
On 3/16/23 00:14, Chaitanya Kulkarni wrote:
> On 3/15/23 15:52, Chaitanya Kulkarni wrote:
>> On 3/15/23 07:20, Christoph Hellwig wrote:
>>> Hi all,
>>>
>>> here is two more patches on top of the work from Damien that I've
>>> applied to nvme-6.4.
>> Looks good.
>>
>> Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>
>>
>> -ck
>>
>>
>
> I think you need this on the top of this,
> I believe it will result in error, please check:-
>
> diff --git a/drivers/nvme/target/admin-cmd.c
> b/drivers/nvme/target/admin-cmd.c
> index 4ee30a4da509..afdf69f92599 100644
> --- a/drivers/nvme/target/admin-cmd.c
> +++ b/drivers/nvme/target/admin-cmd.c
> @@ -692,7 +692,7 @@ static void nvmet_execute_identify(struct
> nvmet_req *req)
> return;
> case NVME_ID_CNS_NS_DESC_LIST:
> nvmet_execute_identify_desclist(req);
> - break;
> + return;
> case NVME_ID_CNS_CS_NS:
> switch (req->cmd->identify.csi) {
> case NVME_CSI_NVM:
>
> -ck
>
>
Indeed is resulting in error, without above fix, unless I messed up
applying patch :-
nvme (nvme-6.4) # git diff
diff --git a/drivers/nvme/target/admin-cmd.c
b/drivers/nvme/target/admin-cmd.c
index 4ee30a4da509..4ede1e4db7eb 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -692,6 +692,7 @@ static void nvmet_execute_identify(struct nvmet_req
*req)
return;
case NVME_ID_CNS_NS_DESC_LIST:
nvmet_execute_identify_desclist(req);
+ pr_info("%s %d\n", __func__, __LINE__);
break;
case NVME_ID_CNS_CS_NS:
switch (req->cmd->identify.csi) {
@@ -720,7 +721,7 @@ static void nvmet_execute_identify(struct nvmet_req
*req)
}
break;
}
-
+ pr_info("%s %d\n", __func__, __LINE__);
nvmet_req_cns_error_complete(req);
}
[ 802.029489] nvmet: creating nvm controller 1 for subsystem testnqn
for NQN
nqn.2014-08.org.nvmexpress:uuid:b65cece3-7e60-4d3a-9fd9-581db201b191.
[ 802.029598] nvme nvme1: creating 48 I/O queues.
[ 802.033240] nvme nvme1: new ctrl: "testnqn"
[ 802.033320] nvmet: nvmet_execute_identify 695
[ 802.033327] nvmet: nvmet_execute_identify 724
[ 802.033331] nvme nvme1: request 0x7 genctr mismatch (got 0x0 expected
0x1)
[ 802.034677] nvme nvme1: got bad command_id 0x7 on queue 0
-ck
More information about the Linux-nvme
mailing list