public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: Memory consumption difference between in-kernel and userspace hibernation
Date: Fri, 13 Nov 2009 21:05:07 +0100	[thread overview]
Message-ID: <200911132105.07812.rjw@sisk.pl> (raw)
In-Reply-To: <20091112221223.3459b8cc@surf>

On Thursday 12 November 2009, Thomas Petazzoni wrote:
> Hello,
> 
> Thanks for your feedback.
> 
> Le Thu, 12 Nov 2009 21:52:02 +0100,
> "Rafael J. Wysocki" <rjw@sisk.pl> a écrit :
> 
> > The userspace interface doesn't really allow you to write to a file.
> > You can write into the area the file occupies on the partition, but
> > you can't use the filesystem code for the actual writing.  At least
> > you shouldn't do that.
> 
> Ah. But it seems to work fairly nicely. Why can't the filesystem code
> could be used to store the resume image ? Note that my file is stored
> in a separate partition, fully dedicated to storing the resume file and
> mounted only at very specific points in the system lifetime.

That doesn't really matter.

The problem is that the image is likely to contain filesystem data (eg.
superblocks etc.) that correspond to the state before the image has been
created.  Now, your using the filesystem code for writing the image modifies
the on-disk metadata which become inconsistent with the filesystem data in
the image.  This inconsistencies may very well result in an unfixable
corruption of the file system after the resume (that actually happened to
a number of people, so it's not just pure theory).

That really depends on the fileystem used, though.

Thanks,
Rafael
_______________________________________________
linux-pm mailing list
linux-pm@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

  reply	other threads:[~2009-11-13 20:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 20:01 Memory consumption difference between in-kernel and userspace hibernation Thomas Petazzoni
2009-11-12 20:52 ` Rafael J. Wysocki
2009-11-12 21:12   ` Thomas Petazzoni
2009-11-13 20:05     ` Rafael J. Wysocki [this message]
2009-11-21  9:29       ` Pavel Machek
2009-11-13  9:52 ` Thomas Petazzoni
2009-11-13 16:28   ` 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=200911132105.07812.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=thomas.petazzoni@free-electrons.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox