Re: [PATCH v3 8/9] blk-mq: Insert blk_pm_{add,put}_request() calls

Bart Van Assche
2018-08-03T02:57:24Z

On Fri, 2018-08-03 at 08:11 +0800, Ming Lei wrote:
> On Fri, Aug 03, 2018 at 12:08:54AM +0000, Bart Van Assche wrote:
> > On Fri, 2018-08-03 at 07:53 +0800, Ming Lei wrote:
> > > blk_pm_add_request() calls pm_request_=
-resume() for waking up device, but
> > > it is wrong because it is async request, which can't guar=
antee device
> > > will be ready before calling .queue_rq().
> >=20
> > That's a longstanding issue and not something that has been int=
roduced by this
> > patch series. Hence patch 6/9 that issues a warning if pm_r=
equest_resume() would
> > be called.
>=20
> It is introduced by your patch, please see blk_pm_allow_r=
equest().

Did you perhaps misread my patch? Please have a look at commit c8158819d506
("block: implement runtime pm strategy"). I think that commit from =
2013
introduced the pm_request_resume() call in blk_pm_add_r=
equest().

By the way, if you would like to see that call removed, I'm fine with
removing that call.

Thanks,

Bart.