[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 1/3] hw/block/nvme: set NVME_DNR in a single place
From: |
Minwoo Im |
Subject: |
Re: [RFC PATCH 1/3] hw/block/nvme: set NVME_DNR in a single place |
Date: |
Thu, 11 Feb 2021 12:40:19 +0900 |
User-agent: |
Mutt/1.11.4 (2019-03-13) |
On 21-02-10 21:19:43, Klaus Jensen wrote:
> On Feb 11 04:52, Minwoo Im wrote:
> > @@ -945,6 +945,11 @@ static void nvme_post_cqes(void *opaque)
> > static void nvme_enqueue_req_completion(NvmeCQueue *cq, NvmeRequest *req)
> > {
> > assert(cq->cqid == req->sq->cqid);
> > +
> > + if (req->status != NVME_SUCCESS) {
> > + req->status |= NVME_DNR;
> > + }
>
> There are status codes where we do not set the DNR bit (e.g. Data
> Transfer Error, and that might be the only one actually).
Ouch, I think I need to prepare some of switch-helper to figure out
which one needs to be retried or not.
> Maybe a switch such that we do not explicitly set DNR for Data Transfer
> Error (and any other errors we identify), but only if we set it earlier
> in the stack.
Agreed.