Re: [PATCH V4 08/10] block: allow to allocate req with RQF_PREEMPT when queue is preempt frozen

2017-09-14 Thread Ming Lei
On Thu, Sep 14, 2017 at 01:37:14PM +, Bart Van Assche wrote: > On Thu, 2017-09-14 at 09:15 +0800, Ming Lei wrote: > > On Wed, Sep 13, 2017 at 07:07:53PM +, Bart Van Assche wrote: > > > On Thu, 2017-09-14 at 01:48 +0800, Ming Lei wrote: > > > > No, that patch only changes

Re: [PATCH V4 08/10] block: allow to allocate req with RQF_PREEMPT when queue is preempt frozen

2017-09-14 Thread Bart Van Assche
On Thu, 2017-09-14 at 09:15 +0800, Ming Lei wrote: > On Wed, Sep 13, 2017 at 07:07:53PM +, Bart Van Assche wrote: > > On Thu, 2017-09-14 at 01:48 +0800, Ming Lei wrote: > > > No, that patch only changes blk_insert_cloned_request() which is used > > > by dm-rq(mpath) only, nothing to do with

Re: [PATCH V4 08/10] block: allow to allocate req with RQF_PREEMPT when queue is preempt frozen

2017-09-13 Thread Ming Lei
On Wed, Sep 13, 2017 at 07:07:53PM +, Bart Van Assche wrote: > On Thu, 2017-09-14 at 01:48 +0800, Ming Lei wrote: > > No, that patch only changes blk_insert_cloned_request() which is used > > by dm-rq(mpath) only, nothing to do with the reported issue during > > suspend and sending SCSI Domain

Re: [PATCH V4 08/10] block: allow to allocate req with RQF_PREEMPT when queue is preempt frozen

2017-09-13 Thread Bart Van Assche
On Thu, 2017-09-14 at 01:48 +0800, Ming Lei wrote: > No, that patch only changes blk_insert_cloned_request() which is used > by dm-rq(mpath) only, nothing to do with the reported issue during > suspend and sending SCSI Domain validation. There may be other ways to fix the SCSI domain validation

Re: [PATCH V4 08/10] block: allow to allocate req with RQF_PREEMPT when queue is preempt frozen

2017-09-13 Thread Ming Lei
On Wed, Sep 13, 2017 at 05:28:24PM +, Bart Van Assche wrote: > On Thu, 2017-09-14 at 00:48 +0800, Ming Lei wrote: > > Could you please let me know if your concern about race between > > preempt freeze and blk_cleanup_queue() is addressed in my last > > reply? > > Shouldn't we wait until

Re: [PATCH V4 08/10] block: allow to allocate req with RQF_PREEMPT when queue is preempt frozen

2017-09-13 Thread Bart Van Assche
On Thu, 2017-09-14 at 00:48 +0800, Ming Lei wrote: > Could you please let me know if your concern about race between > preempt freeze and blk_cleanup_queue() is addressed in my last > reply? Shouldn't we wait until v4.13-rc1 has been released before spending more energy on this? Certain patches

Re: [PATCH V4 08/10] block: allow to allocate req with RQF_PREEMPT when queue is preempt frozen

2017-09-13 Thread Ming Lei
On Tue, Sep 12, 2017 at 11:40:57AM +0800, Ming Lei wrote: > On Mon, Sep 11, 2017 at 04:03:55PM +, Bart Van Assche wrote: > > On Mon, 2017-09-11 at 19:10 +0800, Ming Lei wrote: > > > @@ -787,6 +787,35 @@ int blk_queue_enter(struct request_queue *q, > > > unsigned flags) > > > if

Re: [PATCH V4 08/10] block: allow to allocate req with RQF_PREEMPT when queue is preempt frozen

2017-09-11 Thread Ming Lei
On Mon, Sep 11, 2017 at 04:03:55PM +, Bart Van Assche wrote: > On Mon, 2017-09-11 at 19:10 +0800, Ming Lei wrote: > > @@ -787,6 +787,35 @@ int blk_queue_enter(struct request_queue *q, unsigned > > flags) > > if (percpu_ref_tryget_live(>q_usage_counter)) > >

Re: [PATCH V4 08/10] block: allow to allocate req with RQF_PREEMPT when queue is preempt frozen

2017-09-11 Thread Bart Van Assche
On Mon, 2017-09-11 at 19:10 +0800, Ming Lei wrote: > @@ -787,6 +787,35 @@ int blk_queue_enter(struct request_queue *q, unsigned > flags) > if (percpu_ref_tryget_live(>q_usage_counter)) > return 0; > > + /* > + * If queue is preempt

[PATCH V4 08/10] block: allow to allocate req with RQF_PREEMPT when queue is preempt frozen

2017-09-11 Thread Ming Lei
REQF_PREEMPT is a bit special because the request is required to be dispatched to lld even when SCSI device is quiesced. So this patch introduces __blk_get_request() to allow block layer to allocate request when queue is preempt frozen, since we will preempt freeze queue before quiescing SCSI