All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Yu <yu.c.chen@intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chenzhou Feng <chenzhoux.feng@intel.com>,
	Pengfei Xu <pengfei.xu@intel.com>, Chen Yu <yu.c.chen@intel.com>
Subject: [PATCH v2 0/2] Fix the hibernation test_resume's swapfile open mode
Date: Wed,  6 Sep 2023 12:18:27 +0800	[thread overview]
Message-ID: <cover.1693972725.git.yu.c.chen@intel.com> (raw)

Fix the regression brought by
commit 5904de0d735b ("PM: hibernate: Do not get block device exclusively
in test_resume mode"), which incorrectly open the swapfile in a wrong
mode, and causes unexpected behavior during non-hibernation operation.

Fix it by really disabling exclusive mode under test_resume.

This is the v2 of the fix for a hibernation test_resume swapfile open issue.
Chenzhou found that v1 has a warning during the stress test. It was due to
broken open mode in swsusp_write(), fixes it in v2.

patch 1 is a renaming of the function parameter, to better reflects the swap
device open mode.
patch 2 is to fix the open mode on the swap device. 

v1: https://lore.kernel.org/lkml/20230823161329.7348-1-yu.c.chen@intel.com/

Chen Yu (2):
  PM: hibernate: Rename the function parameter from snapshot_test to
    exclusive
  PM: hibernate: Fix the exclusive get block device in test_resume mode

 kernel/power/hibernate.c | 12 ++++++------
 kernel/power/power.h     |  4 ++--
 kernel/power/swap.c      | 14 ++++++++------
 3 files changed, 16 insertions(+), 14 deletions(-)

-- 
2.25.1


             reply	other threads:[~2023-09-06  4:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06  4:18 Chen Yu [this message]
2023-09-06  4:18 ` [PATCH v2 1/2] PM: hibernate: Rename the function parameter from snapshot_test to exclusive Chen Yu
2023-09-06  4:18 ` [PATCH v2 2/2] PM: hibernate: Fix the exclusive get block device in test_resume mode Chen Yu
2023-09-06  5:27   ` 回复: " Feng, ChenzhouX

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=cover.1693972725.git.yu.c.chen@intel.com \
    --to=yu.c.chen@intel.com \
    --cc=chenzhoux.feng@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=pengfei.xu@intel.com \
    --cc=rafael@kernel.org \
    /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 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.