Re: [PATCH V3 6/8] block: introduce preempt version of blk_[freeze|unfreeze]_queue

2017-09-04 Thread Ming Lei
On Mon, Sep 04, 2017 at 03:21:08PM +, Bart Van Assche wrote: > On Sat, 2017-09-02 at 21:08 +0800, Ming Lei wrote: > > --- a/include/linux/blkdev.h > > +++ b/include/linux/blkdev.h > > @@ -565,6 +565,10 @@ struct request_queue { > > > > int bypass_depth; > >

Re: [PATCH V3 6/8] block: introduce preempt version of blk_[freeze|unfreeze]_queue

2017-09-04 Thread Bart Van Assche
On Sat, 2017-09-02 at 21:08 +0800, Ming Lei wrote: > --- a/include/linux/blkdev.h > +++ b/include/linux/blkdev.h > @@ -565,6 +565,10 @@ struct request_queue { > > int bypass_depth; > atomic_tmq_freeze_depth; > + spinlock_t

[PATCH V3 6/8] block: introduce preempt version of blk_[freeze|unfreeze]_queue

2017-09-02 Thread Ming Lei
The two APIs are required to allow request allocation of RQF_PREEMPT when queue is preempt frozen. The following two points have to be guaranteed for one queue: 1) preempt freezing can be started only after all in-progress normal & preempt freezings are completed 2) normal freezing can be