On Fri, 2021-04-16 at 16:07 +0200, Hannes Reinecke wrote: > > Hmm. Quite convoluted, methinks. > Shouldn't this achieve the same thing? > > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index e89ec2522ca6..8c36a2196b66 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -303,8 +303,10 @@ static inline enum nvme_disposition > nvme_decide_disposition(struct request *req) > if (likely(nvme_req(req)->status == 0)) > return COMPLETE; > > - if (blk_noretry_request(req) || > - (nvme_req(req)->status & NVME_SC_DNR) || > + if (blk_noretry_request(req)) > + nvme_req(req)->status |= NVME_SC_DNR; > + > + if ((nvme_req(req)->status & NVME_SC_DNR) || > nvme_req(req)->retries >= nvme_max_retries) > return COMPLETE; > I am not in favor of altering ->status to set DNR jus to simplify the following conditional. -Ewan