[PATCH] nvme-tcp: handle failing req immediately for REQ_FAILFAST_DRIVER
Daniel Wagner
dwagner at suse.de
Thu Apr 7 06:53:53 PDT 2022
On Thu, Apr 07, 2022 at 04:42:55PM +0300, Sagi Grimberg wrote:
> > Understood. Would something like this work
> >
> > struct request *rq = blk_mq_rq_from_pdu(queue->request);
> > bool queue_ready = test_bit(NVME_TCP_Q_LIVE, &queue->flags);
> >
> > dev_err(queue->ctrl->ctrl.device,
> > "failed to send request %d\n", ret);
> > if ((ret != -EPIPE && ret != -ECONNRESET) ||
> > (!queue_ready && rq->cmd_flags & REQ_FAILFAST_DRIVER))
> > nvme_tcp_fail_request(queue->request);
> >
> > ?
>
> But in your case the queue is live...
Could we not just test for NVME_CTRL_ADMIN_Q_STOPPED instead as it is
set in nvme_stop_admin_queue:
nvme_tcp_teardown_ctrl
nvme_stop_admin_queue
nvme_shutdown_ctrl
instead?
> I'm thinking that we maybe need a register access timeout value for
> fabrics...
I see there is a shutdown_timeout which is 5 seconds on default. Seems
not to trigger though.
More information about the Linux-nvme
mailing list