All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Josh Boyer <jwboyer@fedoraproject.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Linux PM list <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>, Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org,
	Nigel Cunningham <nigel@tuxonice.net>,
	"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Subject: Re: [RFC][PATCH] PM / Sleep: Freeze filesystems during system suspend/hibernation
Date: Thu, 19 Dec 2013 11:22:16 +1100	[thread overview]
Message-ID: <20131219002216.GT31386@dastard> (raw)
In-Reply-To: <20131218140842.GA20488@amd.pavel.ucw.cz>

On Wed, Dec 18, 2013 at 03:08:42PM +0100, Pavel Machek wrote:
> > > > I disagree - given the problem it is resolving leads to silent
> > > > filesystem corruption, this patch should be considered somewhat of a
> > > > priority to push...
> > > 
> > > Umm. Ok, I forgot what it does, really.
> > 
> > It ensures that the filesystem is in an quiescent state both in
> > memory and on disk, and it cannot be modified in memory or on disk
> > whilst the suspend image is being generated, or by log recovery
> > after a resume before the suspended image has been restored.
> 
> If someone attempts to run log recovery before resume, that's a bug
> and yes, it will corrupt filesystems. (Including ext3). Don't do that.

Freezing the filesystem prevents that accidental mount of the
filesystem from being an issue. It fixes a bug that:

> Documentation/power/swsusp.txt:
> 
>  * BIG FAT WARNING
>    *********************************************************
>  *
>  * If you touch anything on disk between suspend and resume...
>  *                              ...kiss your data goodbye.

Makes this a whole lot less dangerous.

> > > So... for few years now suspend corrupts data on XFS? And Fedora has
> > > the fix but it is not in mainline? That does not sound right...
> > 
> > The issues freezing the filesystem before the suspend image is
> > created affect every journalled filesystem linux supports, be
> > it XFS, ext4, reiser, btrfs, etc.
> 
> Did not it have some problems with ext3?

Please read more carefully: "affect every journalled filesystem
linux supports". So, ext3 is affected because it's a journalling
filesystem.  I didn't list every journalled filesystem Linux
supports - "etc" means there are more examples that aren't
explicitly listed.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2013-12-19  0:22 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-28 13:45 [RFC][PATCH] PM / Sleep: Freeze filesystems during system suspend/hibernation Rafael J. Wysocki
2012-01-28 21:23 ` Nigel Cunningham
2012-01-29 15:55 ` Martin Steigerwald
2012-01-29 19:53   ` Rafael J. Wysocki
2012-01-29 16:28 ` Srivatsa S. Bhat
2012-01-29 19:53   ` Rafael J. Wysocki
2012-01-30 23:24     ` Srivatsa S. Bhat
2012-01-30 20:00 ` Jan Kara
2012-01-30 21:05   ` Rafael J. Wysocki
2012-01-30 21:10     ` Nigel Cunningham
2012-01-31  0:03       ` Jan Kara
2012-01-30 23:58     ` Jan Kara
2012-02-01 13:36 ` Pavel Machek
2012-02-01 15:29   ` Alan Stern
2012-02-10  2:52     ` Jamie Lokier
2012-02-10  9:03       ` Jan Kara
2012-02-02  3:17 ` Nigel Cunningham
2012-02-17 15:41 ` Josh Boyer
2012-02-17 15:41   ` Josh Boyer
2012-02-17 18:33   ` Josh Boyer
2012-02-17 20:59     ` Rafael J. Wysocki
2012-05-25 16:55       ` Josh Boyer
2012-05-25 16:55         ` Josh Boyer
2012-05-25 19:13         ` Rafael J. Wysocki
2013-12-17 16:03           ` Josh Boyer
2013-12-17 16:04             ` Josh Boyer
2013-12-17 23:08               ` Pavel Machek
2013-12-17 23:31                 ` Dave Chinner
2013-12-18  0:01                   ` Pavel Machek
2013-12-18 12:39                     ` Dave Chinner
2013-12-18 14:08                       ` Pavel Machek
2013-12-19  0:22                         ` Dave Chinner [this message]
2013-12-21 23:33                           ` Pavel Machek
2013-12-23  3:48                             ` Dave Chinner
2013-12-18  0:52               ` Rafael J. Wysocki
2013-12-18  1:00                 ` Josh Boyer
2013-12-18  1:16                   ` Rafael J. Wysocki
2013-12-18 12:31                     ` Josh Boyer
2013-12-18 21:40                       ` 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=20131219002216.GT31386@dastard \
    --to=david@fromorbit.com \
    --cc=jack@suse.cz \
    --cc=jwboyer@fedoraproject.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nigel@tuxonice.net \
    --cc=pavel@ucw.cz \
    --cc=rafael.j.wysocki@intel.com \
    --cc=srivatsa.bhat@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.