Re: [PATCH v10 7/8] block: Make blk_get_request() block for non-PM requests while suspended

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

 



On Wed, Sep 26, 2018 at 04:27:40PM +0200, Christoph Hellwig wrote:
> >  		list_for_each_entry(rq, &q->queue_head, queuelist) {
> > -			if (blk_pm_allow_request(rq))
> > -				return rq;
> > -
> > -			if (rq->rq_flags & RQF_SOFTBARRIER)
> > -				break;
> > +#ifdef CONFIG_PM
> > +			/*
> > +			 * If a request gets queued in state RPM_SUSPENDED
> > +			 * then that's a kernel bug.
> > +			 */
> > +			WARN_ON_ONCE(q->rpm_status == RPM_SUSPENDED);
> > +#endif
> 
> I hate this ifdef, but it probably isnt worth adding a helper for this
> assert, so I guess we'll have to live with it..

How about:
			if (IS_ENABLED(CONFIG_PM))
			   WARN_ON_ONCE(q->rpm_status == RPM_SUSPENDED);


-- 
Johannes Thumshirn                                          Storage
jthumshirn@xxxxxxx                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850



[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