[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5231c57d-3f4e-1853-d4d5-cf7f04a32246@acm.org>
Date: Tue, 30 Jun 2020 08:59:00 -0700
From: Bart Van Assche <bvanassche@....org>
To: Alan Stern <stern@...land.harvard.edu>,
Martin Kepplinger <martin.kepplinger@...i.sm>
Cc: jejb@...ux.ibm.com, Can Guo <cang@...eaurora.org>,
martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel@...i.sm
Subject: Re: [PATCH] scsi: sd: add runtime pm to open / release
On 2020-06-29 09:15, Alan Stern wrote:
> Aha. Looking at this more closely, it's apparent that the code in
> blk-core.c contains a logic bug: It assumes that if the BLK_MQ_REQ_PREEMPT
> flag is set then the request can be issued regardless of the queue's
> runtime status. That is not correct when the queue is suspended.
Are you sure of this? In the past (legacy block layer) no requests were
processed for queues in state RPM_SUSPENDED. However, that function and
its successor blk_pm_allow_request() are gone. The following code was
removed by commit 7cedffec8e75 ("block: Make blk_get_request() block for
non-PM requests while suspended").
static struct request *blk_pm_peek_request(struct request_queue *q,
struct request *rq)
{
if (q->dev && (q->rpm_status == RPM_SUSPENDED ||
(q->rpm_status != RPM_ACTIVE && !(rq->cmd_flags & REQ_PM))))
return NULL;
else
return rq;
}
Bart.
Powered by blists - more mailing lists