The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Nigel Cunningham <ncunningham@cyclades.com>
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 00:51:26 +0200	[thread overview]
Message-ID: <20050712225126.GC2184@elf.ucw.cz> (raw)
In-Reply-To: <1121204890.13869.175.camel@localhost>

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.


								Pavel
-- 
teflon -- maybe it is a trademark, but it should not be.

  reply	other threads:[~2005-07-12 22:52 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 [this message]
2005-07-12 23:23       ` Nigel Cunningham
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=20050712225126.GC2184@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ncunningham@cyclades.com \
    --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