From: Chen Yu <yu.c.chen@intel.com>
To: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@ucw.cz>, "Len Brown" <len.brown@intel.com>,
Ye Bin <yebin10@huawei.com>, Nikhil V <quic_nprakash@quicinc.com>,
<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PM: hibernate: Get test_resume hibernation mode working again
Date: Wed, 5 Apr 2023 12:43:03 +0800 [thread overview]
Message-ID: <ZCz8V1zwFtoTHCfK@chenyu5-mobl1> (raw)
In-Reply-To: <20230405034502.583304-1-quic_pkondeti@quicinc.com>
Hi Pavankumar,
On 2023-04-05 at 09:15:02 +0530, Pavankumar Kondeti wrote:
> Commit 39fbef4b0f77 ("PM: hibernate: Get block device exclusively in
> swsusp_check()") changed the opening mode of the block device to
> (FMODE_READ | FMODE_EXCL) during resume. This breaks the test_resume
> hibernation mode as the block device is not available for exclusive
> open. Because the block device is configured as swap during hibernation.
>
> Fix this issue by opening the device in FMODE_READ only in test_resume
> restore path. Cache the flags used in opening the block device so that
> callers of swsusp_close() does not need to worry about test_resume vs
> normal restore.
>
> Fixes: 39fbef4b0f77 ("PM: hibernate: Get block device exclusively in swsusp_check()")
> Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
> ---
> kernel/power/hibernate.c | 21 +++++++++++-----
> kernel/power/power.h | 4 +--
> kernel/power/swap.c | 53 +++++++++++++++++++++++-----------------
> 3 files changed, 48 insertions(+), 30 deletions(-)
>
Thanks for taking a look at this, would the following fix make sense?
https://lore.kernel.org/lkml/20230401165540.322665-1-yu.c.chen@intel.com/
thanks,
Chenyu
next prev parent reply other threads:[~2023-04-05 4:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 3:45 [PATCH] PM: hibernate: Get test_resume hibernation mode working again Pavankumar Kondeti
2023-04-05 4:43 ` Chen Yu [this message]
2023-04-05 7:02 ` Pavan Kondeti
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZCz8V1zwFtoTHCfK@chenyu5-mobl1 \
--to=yu.c.chen@intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=quic_nprakash@quicinc.com \
--cc=quic_pkondeti@quicinc.com \
--cc=rafael@kernel.org \
--cc=yebin10@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox