Re: [PATCH v2 3/4] block, scsi: Make SCSI device suspend and resume work reliably

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux