From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: "Engel, Amit" <amit.engel@dell.com>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
Sagi Grimberg <sagi@grimberg.me>
Cc: "Anner, Ran" <Ran.Anner@dell.com>
Subject: Re: nvmet_set_error ignores error_loc NVMET_NO_ERROR_LOC
Date: Tue, 16 Mar 2021 18:26:27 +0000 [thread overview]
Message-ID: <BYAPR04MB496507F3725ABEA5A8E56E00866B9@BYAPR04MB4965.namprd04.prod.outlook.com> (raw)
In-Reply-To: BL0PR1901MB20202EA160DFA04E828A3719EE6B9@BL0PR1901MB2020.namprd19.prod.outlook.com
On 3/16/21 02:09, Engel, 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 ?
>
Based on your email description I think this is what is needed,
please confirm I'll send out a patch:-
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index b15ed7ac34eb..29a6a1446cd8 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -914,6 +914,7 @@ bool nvmet_req_init(struct nvmet_req *req, struct
nvmet_cq *cq,
req->cqe->sq_head = 0;
req->ns = NULL;
req->error_loc = NVMET_NO_ERROR_LOC;
+ req->param_error_location = 0xffff;
req->error_slba = 0;
/* no support for fused commands yet */
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2021-03-16 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 8:57 nvmet_set_error ignores error_loc NVMET_NO_ERROR_LOC Engel, Amit
2021-03-16 18:26 ` Chaitanya Kulkarni [this message]
2021-04-02 7:35 ` Hou Pu
2021-04-02 23:07 ` Chaitanya Kulkarni
2021-04-04 6:25 ` Engel, Amit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BYAPR04MB496507F3725ABEA5A8E56E00866B9@BYAPR04MB4965.namprd04.prod.outlook.com \
--to=chaitanya.kulkarni@wdc.com \
--cc=Ran.Anner@dell.com \
--cc=amit.engel@dell.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).