Re: [patch] suspend: update documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

On Wed, 2005-07-13 at 08:51, Pavel Machek wrote:
> Hi!
> 
> > > | Update suspend documentation.
> > > | 
> > > | Signed-off-by: Pavel Machek <[email protected]>
> > > | 
> > > | ---
> > > | 
> > > | 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. 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux