All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Bart Van Assche <bvanassche@acm.org>,
	Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Ming Lei <ming.lei@redhat.com>,
	Jianchao Wang <jianchao.w.wang@oracle.com>,
	Hannes Reinecke <hare@suse.com>,
	Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH v10 7/8] block: Make blk_get_request() block for non-PM requests while suspended
Date: Wed, 26 Sep 2018 16:43:57 +0200	[thread overview]
Message-ID: <20180926144357.GC13588@linux-x5ow.site> (raw)
In-Reply-To: <20180926142740.GE8604@lst.de>

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@suse.de                                +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

  reply	other threads:[~2018-09-26 14:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21 20:31 [PATCH v10 0/8] blk-mq: Implement runtime power management Bart Van Assche
2018-09-21 20:31 ` [PATCH v10 1/8] block: Move power management code into a new source file Bart Van Assche
2018-09-26 14:22   ` Christoph Hellwig
2018-09-21 20:31 ` [PATCH v10 2/8] block, scsi: Change the preempt-only flag into a counter Bart Van Assche
2018-09-26  1:33   ` Martin K. Petersen
2018-09-21 20:31 ` [PATCH v10 3/8] block: Split blk_pm_add_request() and blk_pm_put_request() Bart Van Assche
2018-09-26 14:23   ` Christoph Hellwig
2018-09-21 20:31 ` [PATCH v10 4/8] block: Schedule runtime resume earlier Bart Van Assche
2018-09-26 14:25   ` Christoph Hellwig
2018-09-21 20:31 ` [PATCH v10 5/8] percpu-refcount: Introduce percpu_ref_resurrect() Bart Van Assche
2018-09-24 18:01   ` Tejun Heo
2018-09-24 20:43     ` Bart Van Assche
2018-09-26 16:59       ` Tejun Heo
2018-09-26 18:48         ` Bart Van Assche
2018-09-21 20:31 ` [PATCH v10 6/8] block: Allow unfreezing of a queue while requests are in progress Bart Van Assche
2018-09-26 14:25   ` Christoph Hellwig
2018-09-21 20:31 ` [PATCH v10 7/8] block: Make blk_get_request() block for non-PM requests while suspended Bart Van Assche
2018-09-26 14:27   ` Christoph Hellwig
2018-09-26 14:43     ` Johannes Thumshirn [this message]
2018-09-26 14:57       ` Christoph Hellwig
2018-09-26 15:06         ` Johannes Thumshirn
2018-09-26 18:24           ` Bart Van Assche
2018-09-27  6:54             ` Johannes Thumshirn
2018-09-21 20:31 ` [PATCH v10 8/8] blk-mq: Enable support for runtime power management Bart Van Assche
2018-09-26 14:28   ` Christoph Hellwig
2018-09-22  2:32 ` [PATCH v10 0/8] blk-mq: Implement " Jens Axboe
2018-09-26  2:55 ` Ming Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180926144357.GC13588@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=jianchao.w.wang@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.