Re: [PATCH v5 6/8] scsi: Reduce suspend latency

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

 



On Wed, 2017-10-04 at 09:04 +0200, Christoph Hellwig wrote:
> > +	/*
> > +	 * Do not attempt to freeze the queue of an already quiesced device
> > +	 * because that could result in a deadlock.
> > +	 */
> > +	freeze = sdev->sdev_state == SDEV_RUNNING;
> > +	if (freeze)
> > +		blk_mq_freeze_queue(q);
> >  	err = scsi_device_set_state(sdev, SDEV_QUIESCE);
> 
> I don't really like this magic with a freeze inside the lock
> and the magic dependency on the previous.  But I can't really come up
> with a better idea either.

The deadlock I referred to in my comment can only occur if any code would change
the SCSI device state into SDEV_QUIESCE without freezing the request queue first.
I will look into freezing the queue without holding the sdev state mutex.

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