From: Michael Tokarev <mjt@tls.msk.ru>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: linux-pm@vger.kernel.org
Subject: Re: resume from hibernation without touching saved image?
Date: Sat, 01 Nov 2014 08:16:00 +0300 [thread overview]
Message-ID: <54546C90.2000500@msgid.tls.msk.ru> (raw)
In-Reply-To: <1517304.61MqM8NHe8@vostro.rjw.lan>
01.11.2014 02:00, Rafael J. Wysocki wrote:
> On Friday, October 31, 2014 03:00:26 PM Michael Tokarev wrote:
>> Hello again.
>>
>> Currently, linux kernel is able to resume from a previously saved
>> image, and it basically clears up that image when done, so there's
>> no way to resume from it once more.
>
> Which is intentional.
Sure, I understand.
>> Is it possible to _not_ touch the image at all and keep it in the
>> same state as before? Maybe putting it to a readonly block device
>> (like blockdev --setro, or mdadm readonly array) will help?
>
> Keeping an image itself immutable doesn't help, because the state
> recorded in the image has to match the state recorded in other
> places, like fs superblocks and such.
As I mentioned before, all the filesystems are readonly so does not
change no matter how many times you resume, and there's no other state.
The only thing that changes is the swap/image and its signature -- it
can't be made read-only because it must be read-only for the kernel
which is being resumed, but it's impossible since it is the kernel who
writes this image to start with.
> As long as you can't guarantee that all of that is in sync, nothing helps.
No one can guarantee this - eg, usb devices might be removed or added
while the system is sleeping, and so on.
In my case it is easy to guarantee there's no state changes, because
there really aren't. But ofcourse this is a rather rare situation.
Thanks,
/mjt
prev parent reply other threads:[~2014-11-01 5:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-31 12:00 resume from hibernation without touching saved image? Michael Tokarev
2014-10-31 23:00 ` Rafael J. Wysocki
2014-11-01 5:16 ` Michael Tokarev [this message]
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=54546C90.2000500@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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 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).