Re: [PATCH V3] blk-mq: fix race between complete and BLK_EH_RESET_TIMER

2018-04-15 Thread Ming Lei
On Sat, Apr 14, 2018 at 03:22:07PM +, Bart Van Assche wrote: > On Fri, 2018-04-13 at 21:06 -0600, Jens Axboe wrote: > > I like this approach since it keeps the cost outside of the fast > > path. And it's fine to reuse the queue lock for this, instead of > > adding a special lock for something

Re: [PATCH V3] blk-mq: fix race between complete and BLK_EH_RESET_TIMER

2018-04-14 Thread Bart Van Assche
On Fri, 2018-04-13 at 21:06 -0600, Jens Axboe wrote: > I like this approach since it keeps the cost outside of the fast > path. And it's fine to reuse the queue lock for this, instead of > adding a special lock for something we consider a rare occurrence. > > From a quick look this looks sane,

Re: [PATCH V3] blk-mq: fix race between complete and BLK_EH_RESET_TIMER

2018-04-13 Thread Jens Axboe
On 4/12/18 5:59 AM, Ming Lei wrote: > The normal request completion can be done before or during handling > BLK_EH_RESET_TIMER, and this race may cause the request to never be > completed since driver's .timeout() may always return > BLK_EH_RESET_TIMER. > > This issue can't be fixed completely by

[PATCH V3] blk-mq: fix race between complete and BLK_EH_RESET_TIMER

2018-04-12 Thread Ming Lei
The normal request completion can be done before or during handling BLK_EH_RESET_TIMER, and this race may cause the request to never be completed since driver's .timeout() may always return BLK_EH_RESET_TIMER. This issue can't be fixed completely by driver, since the normal completion can be done