linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix the hibernation test_resume's swapfile open mode
@ 2023-09-06  4:18 Chen Yu
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Yu @ 2023-09-06  4:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek
  Cc: linux-pm, linux-kernel, Chenzhou Feng, Pengfei Xu, Chen Yu

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-06  5:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-06  4:18 [PATCH v2 0/2] Fix the hibernation test_resume's swapfile open mode Chen Yu
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).