nvmet_set_error ignores error_loc NVMET_NO_ERROR_LOC

Engel, Amit Amit.Engel at Dell.com
Sun Apr 4 07:25:40 BST 2021


nvme spec 1.4
Figure 195: Get Log Page - Error Information Log Entry (Log Identifier 01h)
Parameter Error Location:
"If the error is not specific to a particular command, then this field shall be set to FFFFh"

So as I understand, the error log may contain errors with error location value 0xffff

-----Original Message-----
From: Hou Pu <houpu.main at gmail.com> 
Sent: Friday, April 2, 2021 10:36 AM
To: Engel, Amit
Cc: Anner, Ran; linux-nvme at lists.infradead.org; sagi at grimberg.me; chaitanya.kulkarni at wdc.com
Subject: Re: nvmet_set_error ignores error_loc NVMET_NO_ERROR_LOC


[EXTERNAL EMAIL] 

On Date: Tue, 16 Mar 2021 08:57:08 +0000, Amit wrote:
> Hello,
> A question regarding Get Log Page - Error Information lid 01h:
> According to nvme spec 1.4,  bytes 15:14 refer to 'Parameter Error Location'
> "If the error is not specific to a particular command, then this field shall be set to FFFFh"
>
> In the current implementation, nvmet_req_init initializes 
> req->error_loc to NVMET_NO_ERROR_LOC (((u16)-1)) Then nvmet_set_error has this condition:

> if (!ctrl || req->error_loc == NVMET_NO_ERROR_LOC)
> 	return;
>
> means that the error log will not contain errors that don't specify 
> error_loc is that expected ?
> don't we expect that param_error_location log page field will be set to FFFFh in case there is no other valid req->error_loc ?

Hi Amit,
I think the specification does not tell us which error should go into the error log page (or does it?). It is decided by implementation and current implementation only records errors with an error_loc other than NVMET_NO_ERROR_LOC.

So the problem here is that:
If some errors which do not set error_loc should go into the error log page, we need some change here.

Thanks,
Hou

 



More information about the Linux-nvme mailing list