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>
Cc: Ye Bin <yebin10@huawei.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Pavankumar Kondeti <quic_pkondeti@quicinc.com>,
	Yifan Li <yifan2.li@intel.com>, Chen Yu <yu.c.chen@intel.com>
Subject: [PATCH v3 0/2] Fix test_resume failure by openning swap device non-exclusively
Date: Fri, 14 Apr 2023 20:10:11 +0800	[thread overview]
Message-ID: <cover.1681443714.git.yu.c.chen@intel.com> (raw)

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


             reply	other threads:[~2023-04-14  4:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14 12:10 Chen Yu [this message]
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

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.1681443714.git.yu.c.chen@intel.com \
    --to=yu.c.chen@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=quic_pkondeti@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=yebin10@huawei.com \
    --cc=yifan2.li@intel.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 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.