On Mon, Jun 27, 2022 at 04:43:35PM -0700, Bart Van Assche wrote: > @@ -854,6 +854,12 @@ static inline blk_status_t nvme_setup_rw(struct nvme_ns *ns, > if (req->cmd_flags & REQ_RAHEAD) > dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH; > > + if (blk_queue_pipeline_zoned_writes(req->q) && > + blk_rq_is_seq_zone_write(req)) > + nvme_req(req)->max_retries = > + min(0UL + type_max(typeof(nvme_req(req)->max_retries)), > + nvme_req(req)->max_retries + req->q->nr_requests); I can't make much sense of what the above is trying to accomplish. This reevaluates max_retries every time the request is retried, and the new max_retries is based on the previous max_retries?