On Mon, Apr 19, 2021 at 10:48 AM Keith Busch <kbusch@xxxxxxxxxx> wrote: > > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index b57157106cac..a0fb9ad132af 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -949,6 +949,9 @@ static void nvme_end_sync_rq(struct request *rq, blk_status_t error) > struct completion *waiting = rq->end_io_data; > > rq->end_io_data = NULL; > + if (error && !nvme_req(rq)->status) Is setting nvme_req(rq)->status for each error return in ->queue_rq() going to gradually roll out, and eventually skipping the fallback here? > + nvme_req(rq)->status = blk_status_to_errno(error); Casting int negative errno to u16 will get 0xfff., meaning NVME_SC_DNR is set. Is that always right? -- Regards, Yuanyuan Zhong