Re: [PATCH 2/2] block: fix peeking requests during PM

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

 



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.




[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