From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Colin Walters <walters@verbum.org>,
xfs <linux-xfs@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] vfs: freeze filesystems just prior to reboot
Date: Fri, 19 May 2017 12:41:57 -0700 [thread overview]
Message-ID: <20170519194157.GK4519@birch.djwong.org> (raw)
In-Reply-To: <20170519152734.qd4lf32e7wst4jdh@thunk.org>
On Fri, May 19, 2017 at 11:27:34AM -0400, Theodore Ts'o wrote:
> On Fri, May 19, 2017 at 10:00:31AM -0400, Colin Walters wrote:
> > As a maintainer of one of those userspace tools (https://github.com/ostreedev/ostree),
> > which I don't think is the one in question here, but likely has the same
> > issue - I'd like to have some sort of API to fix this - maybe flush the journal *without*
> > remounting r/o?
> >
> > Unlike the case you're talking about with rebooting into a special
> > update mode, libostree constructs a new root with hardlinks while
> > the system is running. Hence, system downtime is just reboot, like
> > dual-partition update systems, except we're more flexible.
> >
> > Although hm...I guess an API to flush the journal would only narrow
> > the race.
> >
> > Is the single partition case really just doomed?
>
> One of the things that came up when Darrick and I discussed this on
> the weekly ext4 developer's conference call was our mutual wonderment
> that none of the userspace tools implemented a reboot by created a
> tmpfs chroot, pivoting into the chroot, and then unmounting all of the
> remaining file systems.
systemd seems to have the ability to do this -- if something dumps an
executable into /run/initramfs/shutdown (and remounts /run with 'exec')
then systemd will pivot to this script which can then kill everything it
needs and then unmount the filesystems. Or upgrade the fs. Seeing as
the rootfs is still mounted ro at the point that the shutdown script is
run, it could pull in whatever tools it wants.
Or inject malware, I guess. :P
In any case, I don't think it's unreasonable to want a system updater to
be able to detect that the fs containing with vmlinuz and initrd hasn't
unmounted at the end of the upgrade, and therefore it needs to resort to
stronger tactics to forcibly unmount it before systemd reboots.
> This would also allow update schemes who want to enable various new
> file system features, or upgrade the root file system somehow, to be
> able to do so while the root file system is completely and cleanly
> unmounted.
>
> The other thing that would be useful is if grub2 would actually be
> able to replay the file system journal --- but given that grub2 is
Gross! :)
I don't think the XFS community will be enthusiastic about supporting
whatever wreckage may come out of that.
> GPLv3, and both ext4 and xfs are GPLv2-only, and given that past
> attempts of teams attempting to do clean room reimplementations of
> complex code bases for licensing reasons only (cough, make_ext4fs,
> *cough*) have not necessarily turned out well, I'm at least not going
> to hold my breath.
Err... yes, but that's a different thread altogether.
--D
>
> - Ted
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-05-19 19:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 0:20 [PATCH] vfs: freeze filesystems just prior to reboot Darrick J. Wong
2017-05-19 8:29 ` Amir Goldstein
2017-05-19 18:58 ` Darrick J. Wong
2017-05-19 14:00 ` Colin Walters
2017-05-19 15:27 ` Theodore Ts'o
2017-05-19 16:34 ` Colin Walters
2017-05-19 16:48 ` Colin Walters
2017-05-19 18:20 ` Theodore Ts'o
2017-05-19 19:41 ` Darrick J. Wong [this message]
2017-05-23 11:10 ` Jan Kara
2017-05-19 19:01 ` Darrick J. Wong
2017-08-03 20:24 ` Colin Walters
2017-08-05 14:16 ` Christoph Hellwig
2017-08-05 15:45 ` Darrick J. Wong
2017-08-11 10:02 ` Christoph Hellwig
2017-08-11 16:26 ` Darrick J. Wong
2017-08-11 16:27 ` Christoph Hellwig
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=20170519194157.GK4519@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=walters@verbum.org \
/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).