All of
 help / color / mirror / Atom feed
From: Bart Van Assche <>
To: Alan Stern <>
Cc:, Can Guo <>,,
Subject: Re: [PATCH v3] SCSI and block: Simplify resume handling
Date: Wed, 8 Jul 2020 20:29:43 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 2020-07-06 08:14, Alan Stern wrote:
> Commit 05d18ae1cc8a ("scsi: pm: Balance pm_only counter of request
> queue during system resume") fixed a problem in the block layer's
> runtime-PM code: blk_set_runtime_active() failed to call
> blk_clear_pm_only().  However, the commit's implementation was
> awkward; it forced the SCSI system-resume handler to choose whether to
> call blk_post_runtime_resume() or blk_set_runtime_active(), depending
> on whether or not the SCSI device had previously been runtime
> suspended.
> This patch simplifies the situation considerably by adding the missing
> function call directly into blk_set_runtime_active() (under the
> condition that the queue is not already in the RPM_ACTIVE state).
> This allows the SCSI routine to revert back to its original form.
> Furthermore, making this change reveals that blk_post_runtime_resume()
> (in its success pathway) does exactly the same thing as
> blk_set_runtime_active().  The duplicate code is easily removed by
> making one routine call the other.
> No functional changes are intended.
> Signed-off-by: Alan Stern <>
> CC: Can Guo <>
> CC: Bart Van Assche <>

This patch looks good to me. Can, since this patch modifies code in
which you recently fixed a bug, would it be possible to test this patch?



  reply	other threads:[~2020-07-09  3:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01 18:37 [PATCH v2] " Alan Stern
2020-07-06  2:41 ` Bart Van Assche
2020-07-06 15:14   ` [PATCH v3] " Alan Stern
2020-07-09  3:29     ` Bart Van Assche [this message]
2020-07-21  3:01       ` Martin K. Petersen
2020-07-23  3:53     ` Bart Van Assche
2020-07-25  2:50     ` Martin K. Petersen
2020-07-22  1:46 ` [PATCH v2] " Can Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v3] SCSI and block: Simplify resume handling' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.