linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Fix test_resume failure by openning swap device non-exclusively
@ 2023-04-14 12:10 Chen Yu
  2023-04-14 12:10 ` [PATCH v3 1/2] PM: hibernate: Turn snapshot_test into global variable Chen Yu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chen Yu @ 2023-04-14 12:10 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown
  Cc: Ye Bin, linux-pm, linux-kernel, Pavankumar Kondeti, Yifan Li,
	Chen Yu

test_resume does not work in current kernel when using swapfile for hibernation.
This is because the swap device should be openned non-exclusively in test_resume mode.

Patch 1 is a preparation to turn snapshot_test into a global variable.
Patch 2 is the fix to open swap device non-exclusively only for test_resume mode.

Change since v2:
Adjust the initialization of fmode and refine the commit message
per Rafael's suggestion.

Change since v1:
Turn snapshot_test into global variable and do not introduce parameters for swsusp_check()
nor load_image_and_restore().

Chen Yu (2):
  PM: hibernate: Turn snapshot_test into global variable
  PM: hibernate: Do not get block device exclusively in test_resume mode

 kernel/power/hibernate.c | 15 ++++++++++++---
 kernel/power/power.h     |  1 +
 kernel/power/swap.c      |  8 ++++++--
 3 files changed, 19 insertions(+), 5 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2023-04-27 17:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14 12:10 [PATCH v3 0/2] Fix test_resume failure by openning swap device non-exclusively Chen Yu
2023-04-14 12:10 ` [PATCH v3 1/2] PM: hibernate: Turn snapshot_test into global variable Chen Yu
2023-04-14 12:10 ` [PATCH v3 2/2] PM: hibernate: Do not get block device exclusively in test_resume mode Chen Yu
2023-04-27 17:02 ` [PATCH v3 0/2] Fix test_resume failure by openning swap device non-exclusively Rafael J. Wysocki

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).