Re: [PATCH] blk-mq: Allow blocking queue tag iter callbacks

2018-09-25 Thread Keith Busch
On Tue, Sep 25, 2018 at 08:14:45AM -0700, Bart Van Assche wrote: > On Tue, 2018-09-25 at 08:39 -0600, Keith Busch wrote: > > On Tue, Sep 25, 2018 at 10:39:46AM +0800, jianchao.wang wrote: > > > But the issue is the left part of blk_mq_timeout_work is moved out of > > > protection of q refcount. >

Re: [PATCH] blk-mq: Allow blocking queue tag iter callbacks

2018-09-25 Thread Bart Van Assche
On Tue, 2018-09-25 at 08:39 -0600, Keith Busch wrote: > On Tue, Sep 25, 2018 at 10:39:46AM +0800, jianchao.wang wrote: > > But the issue is the left part of blk_mq_timeout_work is moved out of > > protection of q refcount. > > I'm not sure what you mean by "left part". The only part that isn't >

Re: [PATCH] blk-mq: Allow blocking queue tag iter callbacks

2018-09-25 Thread Keith Busch
On Tue, Sep 25, 2018 at 10:39:46AM +0800, jianchao.wang wrote: > Hi Bart > > On 09/25/2018 10:20 AM, Bart Van Assche wrote: > > On 9/24/18 7:11 PM, jianchao.wang wrote: > >> Hi Keith > >> > >> On 09/25/2018 05:09 AM, Keith Busch wrote: > >>> -    /* A deadlock might occur if a request is stuck

Re: [PATCH] blk-mq: Allow blocking queue tag iter callbacks

2018-09-24 Thread jianchao.wang
Hi Bart On 09/25/2018 10:20 AM, Bart Van Assche wrote: > On 9/24/18 7:11 PM, jianchao.wang wrote: >> Hi Keith >> >> On 09/25/2018 05:09 AM, Keith Busch wrote: >>> -    /* A deadlock might occur if a request is stuck requiring a >>> - * timeout at the same time a queue freeze is waiting >>> -  

Re: [PATCH] blk-mq: Allow blocking queue tag iter callbacks

2018-09-24 Thread Bart Van Assche
On 9/24/18 7:11 PM, jianchao.wang wrote: Hi Keith On 09/25/2018 05:09 AM, Keith Busch wrote: - /* A deadlock might occur if a request is stuck requiring a -* timeout at the same time a queue freeze is waiting -* completion, since the timeout code would not be able to -

Re: [PATCH] blk-mq: Allow blocking queue tag iter callbacks

2018-09-24 Thread jianchao.wang
Hi Keith On 09/25/2018 05:09 AM, Keith Busch wrote: > - /* A deadlock might occur if a request is stuck requiring a > - * timeout at the same time a queue freeze is waiting > - * completion, since the timeout code would not be able to > - * acquire the queue reference here. > -

[PATCH] blk-mq: Allow blocking queue tag iter callbacks

2018-09-24 Thread Keith Busch
A recent commit had tag iterator callbacks run under the rcu read lock. Existing callbacks exist that do not satisy the rcu non-blocking requirement. The commit intended to prevent an iterator from accessing a queue that's being modified. This patch fixes the original issue by taking a queue