[PATCH 4/9] nvme: do not restart the request timeout if we're resetting the controller

Busch, Keith keith.busch at intel.com
Thu Oct 22 10:15:18 PDT 2015


But the request is available for reuse after completion. Can we can rely on REQ_ATOM_COMPETE when the req is allocated for a new command?

> -----Original Message-----
> From: Christoph Hellwig [mailto:hch at lst.de]
> Sent: Thursday, October 22, 2015 10:31 AM
> To: Busch, Keith
> Cc: Christoph Hellwig; axboe at fb.com; linux-nvme at lists.infradead.org
> Subject: Re: [PATCH 4/9] nvme: do not restart the request timeout if we're resetting the
> controller
> 
> On Thu, Oct 22, 2015 at 04:27:03PM +0000, Busch, Keith wrote:
> > On Thu, Oct 22, 2015 at 02:03:36PM +0200, Christoph Hellwig wrote:
> > > Otherwise we're never going to complete a command when it is restarted just
> > > after we completed all other outstanding commands in nvme_clear_queue.
> >
> > Returning BLK_EH_HANDLED to block mq's timeout handler has the block layer
> > complete the request. However, the reset work is going to force cancel
> > the request anyway, so the same command will be completed twice. That
> > can't be right ... right?
> 
> No, it's not going to complete it if it already was completed, check the
> logic around the REQ_ATOM_COMPLETE flag.



More information about the Linux-nvme mailing list