On Fri, 2017-09-22 at 06:04 +0800, Ming Lei wrote:
> On Thu, Sep 21, 2017 at 02:22:54PM -0700, Bart Van Assche wrote:
> > --- a/block/blk-core.c
> > +++ b/block/blk-core.c
> > @@ -1429,11 +1429,18 @@ struct request *blk_get_request(struct 
> > request_queue *q, unsigned int op,
> >                             gfp_t gfp_mask)
> >  {
> >     struct request *req;
> > +   const bool may_sleep = gfp_mask & __GFP_DIRECT_RECLAIM;
> > +
> > +   if (unlikely(blk_queue_preempt_only(q) && !(op & REQ_PREEMPT))) {
> 
> The flag is set with queue_lock, but checked without any lock, do you
> think it is safe in this way?
> 
> Also this flag isn't checked in normal I/O path, but you unfreeze
> queue during scsi_device_quiesce(), then any normal I/O can come
> from that time.

I will address both comments in the next version of this patch series.

Bart.

Reply via email to