Re: [PATCH] block: Keep RPM_ACTIVE in blk_pre_runtime_resume() when already active
From: Brian Norris
Date: Tue Nov 03 2026 - 15:00:22 EST
Hi Bart,
On Thu, Oct 29, 2026 at 09:22:23AM -0700, Bart Van Assche wrote:
> On 10/29/26 12:08 AM, Stanley Jhu wrote:
> > 2. The first runtime resume fails in the driver callback, and
> > blk_post_runtime_resume() sets q->rpm_status to RPM_ACTIVE and calls
> > blk_clear_pm_only(), decrementing q->pm_only from 1 to 0 so recovery
> > commands can enter the queue (intended since
> > commit 6e1fcab00a23 ("scsi: block: pm: Always set request queue
> > runtime active in blk_post_runtime_resume()")).
>
> q->rpm_status should be changed back to RPM_SUSPENDED if a runtime
> resume fails. The changes made my this patch don't look right to me.
Pardon me if I'm misreading/misunderstanding, but I believe your
suggestion is essentially to unwind the quoted commit 6e1fcab00a23,
which might reintroduce a deadlock.
Brian