From: Jamie Lokier <jamie@shareable.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Pavel Machek <pavel@ucw.cz>, "Rafael J. Wysocki" <rjw@sisk.pl>,
Linux PM list <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>, Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, Dave Chinner <david@fromorbit.com>,
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: Fri, 10 Feb 2012 02:52:17 +0000 [thread overview]
Message-ID: <20120210025217.GA9258@jl-vm1.vm.bytemark.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1202011027150.1405-100000@iolanthe.rowland.org>
Alan Stern wrote:
> On Wed, 1 Feb 2012, Pavel Machek wrote:
>
> > > particular, this should help to solve a long-standing issue that, in
> > > some cases, during resume from hibernation the boot loader causes the
> > > journal to be replied for the filesystem containing the kernel image
> > > and/or initrd causing it to become inconsistent with the information
> > > stored in the hibernation image.
> >
> > Ungood. Why is bootloader/initrd doing that? If it mounts filesystem
> > read/write, what is the guarantee that it will not change data on the
> > filesystem, breaking stuff?
> >
> > Bootloaders should just not replay journals.
> >
> > > The user-space-driven hibernation (s2disk) is not covered by this
> > > change, because the freezing of filesystems prevents s2disk from
> > > accessing device special files it needs to do its job.
> >
> > ...so bootloaders need to be fixed, anyway.
>
> I don't know about bootloaders, but from what I've heard, Linux fs
> drivers (including those inside initrds) always replay the journal,
> even if the filesystem is mounted read-only. This could be considered
> a bug in the filesystem code.
Theoretically a filesystem might need replay for the bootloader to see
a non-corrupt image, even for just the files it uses.
For example if the last state was in the middle of updating the root
directory, the /boot entry in the root directory might not be reliably
found without replaying the journal.
However replaying a journal when mounted read-only should probably
track journalled blocks in memory only, not commit back to the storage.
All the best,
-- Jamie
next prev parent reply other threads:[~2012-02-10 2:52 UTC|newest]
Thread overview: 37+ 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 [this message]
2012-02-10 9:03 ` Jan Kara
2012-02-02 3:17 ` Nigel Cunningham
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 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
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=20120210025217.GA9258@jl-vm1.vm.bytemark.co.uk \
--to=jamie@shareable.org \
--cc=david@fromorbit.com \
--cc=jack@suse.cz \
--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=rjw@sisk.pl \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=stern@rowland.harvard.edu \
/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;
as well as URLs for NNTP newsgroup(s).