The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@cyclades.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: randy_dunlap <rdunlap@xenotime.net>,
	akpm@zip.com.au,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch] suspend: update documentation
Date: Wed, 13 Jul 2005 09:23:44 +1000	[thread overview]
Message-ID: <1121210623.8109.3.camel@localhost> (raw)
In-Reply-To: <20050712225126.GC2184@elf.ucw.cz>

Hi.

On Wed, 2005-07-13 at 08:51, Pavel Machek wrote:
> Hi!
> 
> > > | Update suspend documentation.
> > > | 
> > > | Signed-off-by: Pavel Machek <pavel@suse.cz>
> > > | 
> > > | ---
> > > | 
> > > | diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
> > > | --- a/Documentation/power/swsusp.txt
> > > | +++ b/Documentation/power/swsusp.txt
> > > | @@ -318,3 +318,10 @@ As a rule of thumb use encrypted swap to
> > > |  system is shut down or suspended. Additionally use the encrypted
> > > |  suspend image to prevent sensitive data from being stolen after
> > > |  resume.
> > > | +
> > > | +Q: Why we cannot suspend to a swap file?
> > > 
> > > Q: Why can't we suspend to a swap file?
> > > or
> > > Q: Why can we not suspend to a swap file?
> > > 
> > > | +
> > > | +A: Because accessing swap file needs the filesystem mounted, and
> > > | +filesystem might do something wrong (like replaying the journal)
> > > | +during mount. [Probably could be solved by modifying every filesystem
> > > | +to support some kind of "really read-only!" option. Patches welcome.]
> > 
> > This is wrong. Suspend2 has supported writing to a swap file for a long
> > time (since 1.0), without requiring the filesystem to be mounted when
> > resuming. We just need to store the bdev and block numbers in the image
> > header.
> 
> Uh, and then you pass something like resume=/dev/hda5@BLOCKID on
> command line? Okay, that could work.
> 
> Does this look fair?
> 
> Q: Why can't we suspend to a swap file?
> 
> A: Because accessing swap file needs the filesystem mounted, and
> filesystem might do something wrong (like replaying the journal)
> during mount.
> 
> There are few ways to get that fixed:
> 
> 1) Probably could be solved by modifying every filesystem to support
> some kind of "really read-only!" option. Patches welcome.
> 
> 2) suspend2 gets around that by storing absolute positions in on-disk
> image, with resume parameter pointing directly to suspend header.

And a block size. (It affects the interpretation of the block number).

Apart from that, yes.

Regards,

Nigel
-- 
Evolution.
Enumerate the requirements.
Consider the interdependencies.
Calculate the probabilities.
Be amazed that people believe it happened. 


  reply	other threads:[~2005-07-12 23:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12  9:05 [patch] suspend: update documentation Pavel Machek
2005-07-12 17:24 ` randy_dunlap
2005-07-12 21:48   ` Nigel Cunningham
2005-07-12 22:51     ` Pavel Machek
2005-07-12 23:23       ` Nigel Cunningham [this message]
2005-07-12 22:48   ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2006-01-06 11:09 Pavel Machek
2006-01-06 16:46 ` Randy.Dunlap
2006-01-06 16:51   ` Pavel Machek
2006-01-06 20:53   ` Randy.Dunlap
2006-02-05 11:37 Pavel Machek

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=1121210623.8109.3.camel@localhost \
    --to=ncunningham@cyclades.com \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rdunlap@xenotime.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