Skip to content

Fix the hibernation test_resume's swapfile open mode

Chen Yu linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 1 replyIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2PM: hibernate: Rename the function parameter from snapshot_test to exclusivekernel/power/power.h kernel/power/swap.c+10 -80 replies
2/2PM: hibernate: Fix the exclusive get block device in test_resume modekernel/power/hibernate.c+6 -61 reply

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchChenzhou Feng
1/2
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] Fix the hibernation test_resume's swapfile open mode

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/[email protected]/

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(-)
Signature · 1 line
2.25.1