From: Vivek Goyal <vgoyal@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Sargun Dhillon <sargun@sargun.me>,
overlayfs <linux-unionfs@vger.kernel.org>,
Miklos Szeredi <miklos@szeredi.hu>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Giuseppe Scrivano <gscrivan@redhat.com>,
Daniel J Walsh <dwalsh@redhat.com>,
David Howells <dhowells@redhat.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Chengguang Xu <cgxu519@mykernel.net>
Subject: Re: [RFC PATCH 3/3] overlay: Add the ability to remount volatile directories when safe
Date: Tue, 17 Nov 2020 11:46:00 -0500 [thread overview]
Message-ID: <20201117164600.GC78221@redhat.com> (raw)
In-Reply-To: <CAOQ4uxg1ZNSid58LLsGC2tJLk_fpJfu13oOzCz5ScEi6y_4Nnw@mail.gmail.com>
On Tue, Nov 17, 2020 at 05:24:33PM +0200, Amir Goldstein wrote:
> > > I guess if we change fsync and syncfs to do nothing but return
> > > error if any writeback error happened since mount we will be ok?
> >
> > I guess that will not be sufficient. Because overlay fsync/syncfs can
> > only retrun any error which has happened so far. It is still possible
> > that error happens right after this fsync call and application still
> > reads back old/corrupted data.
> >
> > So this proposal reduces the race window but does not completely
> > eliminate it.
> >
>
> That's true.
>
> > We probably will have to sync upper/ and if there are no errors reported,
> > then it should be ok to consume data back.
> >
> > This leads back to same issue of doing fsync/sync which we are trying
> > to avoid with volatile containers. So we have two options.
> >
> > A. Build volatile containers should sync upper and then pack upper/ into
> > an image. if final sync returns error, throw away the container and
> > rebuild image. This will avoid intermediate fsync calls but does not
> > eliminate final syncfs requirement on upper. Now one can either choose
> > to do syncfs on upper/ or implement a more optimized syncfs through
> > overlay so that selctives dirty inodes are synced instead.
> >
> > B. Alternatively, live dangerously and know that it is possible that
> > writeback error happens and you read back corrupted data.
> >
>
> C. "shutdown" the filesystem if writeback errors happened and return
> EIO from any read, like some blockdev filesystems will do in face
> of metadata write errors
>
> I happen to have a branch ready for that ;-)
> https://github.com/amir73il/linux/commits/ovl-shutdown
This branch seems to implement shutdown ioctl. So it will still need
glue code to detect writeback failure in upper/ and trigger shutdown
internally?
And if that works, then Sargun's patches can fit in nicely on top which
detect writeback failures on remount and will shutdown fs.
Thanks
Vivek
next prev parent reply other threads:[~2020-11-17 16:46 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 4:57 [RFC PATCH 0/3] Make overlayfs volatile mounts reusable Sargun Dhillon
2020-11-16 4:57 ` [RFC PATCH 1/3] fs: Add s_instance_id field to superblock for unique identification Sargun Dhillon
2020-11-16 5:07 ` Sargun Dhillon
2020-11-16 4:57 ` [RFC PATCH 2/3] overlay: Add ovl_do_getxattr helper Sargun Dhillon
2020-11-16 11:00 ` Amir Goldstein
2020-11-16 4:57 ` [RFC PATCH 3/3] overlay: Add the ability to remount volatile directories when safe Sargun Dhillon
2020-11-16 9:31 ` Amir Goldstein
2020-11-16 10:30 ` Sargun Dhillon
2020-11-16 11:17 ` Amir Goldstein
2020-11-16 12:52 ` Amir Goldstein
2020-11-16 14:42 ` Vivek Goyal
2020-11-16 14:45 ` Vivek Goyal
2020-11-16 15:20 ` Amir Goldstein
2020-11-16 16:36 ` Vivek Goyal
2020-11-16 18:25 ` Sargun Dhillon
2020-11-16 19:27 ` Vivek Goyal
2020-11-16 20:18 ` Amir Goldstein
2020-11-16 21:09 ` Vivek Goyal
2020-11-17 5:33 ` Amir Goldstein
2020-11-17 14:48 ` Vivek Goyal
2020-11-17 15:24 ` Amir Goldstein
2020-11-17 15:40 ` Vivek Goyal
2020-11-17 16:46 ` Vivek Goyal [this message]
2020-11-17 18:03 ` Amir Goldstein
2020-11-17 18:29 ` Vivek Goyal
2020-11-18 7:24 ` Amir Goldstein
2020-11-18 8:27 ` Sargun Dhillon
2020-11-18 10:46 ` Amir Goldstein
2020-11-18 14:55 ` Vivek Goyal
2020-11-16 21:26 ` Vivek Goyal
2020-11-16 22:14 ` Sargun Dhillon
2020-11-17 5:41 ` Amir Goldstein
2020-11-17 17:05 ` Vivek Goyal
2020-11-16 17:38 ` Sargun Dhillon
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=20201117164600.GC78221@redhat.com \
--to=vgoyal@redhat.com \
--cc=amir73il@gmail.com \
--cc=cgxu519@mykernel.net \
--cc=dhowells@redhat.com \
--cc=dwalsh@redhat.com \
--cc=gscrivan@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=sargun@sargun.me \
--cc=viro@zeniv.linux.org.uk \
/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).