Re: [PATCH V3 1/2] blk-mq: introduce blk_mq_complete_request_sync()

2019-04-08 Thread Christoph Hellwig
On Mon, Apr 08, 2019 at 10:15:05AM -0600, Keith Busch wrote: > > +bool blk_mq_complete_request_sync(struct request *rq) > > +{ > > + if (unlikely(blk_should_fake_timeout(rq->q))) > > + return false; > > + > > + WRITE_ONCE(rq->state, MQ_RQ_COMPLETE); > > + rq->q->mq_ops->complete(rq)

Re: [PATCH V3 1/2] blk-mq: introduce blk_mq_complete_request_sync()

2019-04-08 Thread Keith Busch
On Mon, Apr 08, 2019 at 05:40:46PM +0800, Ming Lei wrote: > In NVMe's error handler, follows the typical steps of tearing down > hardware for recovering controller: > > 1) stop blk_mq hw queues > 2) stop the real hw queues > 3) cancel in-flight requests via > blk_mq_tagset_busy_iter(tags, ca

[PATCH V3 1/2] blk-mq: introduce blk_mq_complete_request_sync()

2019-04-08 Thread Ming Lei
In NVMe's error handler, follows the typical steps of tearing down hardware for recovering controller: 1) stop blk_mq hw queues 2) stop the real hw queues 3) cancel in-flight requests via blk_mq_tagset_busy_iter(tags, cancel_request, ...) cancel_request(): mark the request as abort