On Tue, 2017-10-03 at 10:47 +0200, Christoph Hellwig wrote:
> -static struct request *blk_pm_peek_request(struct request_queue *q,
> -                                        struct request *rq)
> +static bool blk_pm_allow_request(struct request *rq)
>  {
> -     if (q->dev && (q->rpm_status == RPM_SUSPENDED ||
> -         (q->rpm_status != RPM_ACTIVE && !(rq->rq_flags & RQF_PM))))
> -             return NULL;
> -     else
> -             return rq;
> +     if (!rq->q->dev)
> +             return true;
> +
> +     switch (rq->q->rpm_status) {
> +     case RPM_SUSPENDED:
> +             return false;
> +     case RPM_ACTIVE:
> +             return rq->rq_flags & RQF_PM;
> +     default:
> +             return true;
> +     }
>  }

Hello Christoph,

The old code does not process non-PM requests in the RPM_SUSPENDING mode nor
in the RPM_RESUMING code. I think the new code processes all requests in
these two modes. Was that behavior change intended?

Thanks,

Bart.

Reply via email to