From: Eryu Guan <eguan@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>, Jan Kara <jack@suse.com>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-unionfs@vger.kernel.org,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
fstests <fstests@vger.kernel.org>,
Eric Sandeen <sandeen@sandeen.net>
Subject: Re: [PATCH 0/2] overlayfs: support freeze/thaw/syncfs
Date: Fri, 20 Jan 2017 20:03:47 +0800 [thread overview]
Message-ID: <20170120120347.GX1859@eguan.usersys.redhat.com> (raw)
In-Reply-To: <CAOQ4uxjaFRXaHRmZSbBzSCDcL0HnNxCyVevjCPqoOROkse8wGw@mail.gmail.com>
On Fri, Jan 20, 2017 at 10:49:07AM +0200, Amir Goldstein wrote:
> On Thu, Jan 19, 2017 at 2:13 PM, Amir Goldstein <amir73il@gmail.com> wrote:
> > Miklos,
> >
> > I implemented freeze/thaw of overlayfs, because I need it for
> > overlay snapshots (CoW decision is made before mnt_wat_write(upper)
> > and I need to serialize it with snapshot take).
> >
> > Not sure if there are other use cases for overlayfs freeze??
> >
> > Tested freeze stress with xfstest generic/068 generic/390.
> >
> > While staring at the code, I realized that syncfs(2) for overlayfs
> > seems broken. It looks like only inodes are synced and upper fs
> > metadata is not being flushed, but I could be wrong.
> >
> > Tested sync sanity with -g quick (although no test calls syncfs directly).
> > Tested the usual unionmount sanity over xfs and over tmpfs.
> >
> > I am not sure exactly how to write a test case to verify this alleged
> > breakage?
> >
>
> Well, I have a smoking gun.
> Wrote this xfs specific test, which checks xfs stats after syncfs/fsync:
> https://github.com/amir73il/overlayfs/blob/master/tests/xfs_syncfs.sh
>
> Good (on xfs 4.10.0-rc4):
> # ./syncfs.sh /base/
> before touch
> xfs_log_force = 375
> after touch
> xfs_log_force = 375
> after syncfs
> xfs_log_force = 376
> after fsync
> xfs_log_force = 376
> after fsync #2
> xfs_log_force = 376
>
> Bad (on overlayfs 4.10.0-rc4):
> # ./syncfs.sh /mnt
> before touch
> xfs_log_force = 376
> after touch
> xfs_log_force = 376
> after syncfs
> xfs_log_force = 376
> after fsync
> xfs_log_force = 377
> after fsync #2
> xfs_log_force = 377
>
> Overlayfs syncfs fails to flush the xfs log.
>
> I'll see if I can put this test into xfstests.
> I am going to need some sort of require_upper_fs_is_xfs
> not sure id it already exists.
There's no such _require rules in xfstests yet.
>
> If anyone has suggestions how to write this test not xfs specific I
> would be happy to hear.
> Eryu?
Sorry, I have no idea right now..
Eryu
>
> Also, FYI, xfs_io -c syncfs is broken.
> Going to send a fix patch soon.
next prev parent reply other threads:[~2017-01-20 12:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 12:13 [PATCH 0/2] overlayfs: support freeze/thaw/syncfs Amir Goldstein
2017-01-19 12:13 ` [PATCH 1/2] ovl: support freeze/thaw super Amir Goldstein
2017-01-23 8:47 ` Amir Goldstein
2017-01-23 13:23 ` Pavel Emelyanov
2017-04-03 11:27 ` Amir Goldstein
2017-04-04 17:47 ` Serge E. Hallyn
2017-04-04 18:01 ` Tycho Andersen
2017-04-04 18:59 ` Amir Goldstein
2017-04-04 19:07 ` Tycho Andersen
2017-01-19 12:13 ` [PATCH 2/2] ovl: properly implement sync_filesystem() Amir Goldstein
2017-01-24 17:14 ` Christoph Hellwig
2017-01-25 17:51 ` Amir Goldstein
2017-01-19 19:03 ` [PATCH 0/2] overlayfs: support freeze/thaw/syncfs Amir Goldstein
2017-01-20 8:27 ` Jan Kara
2017-01-20 8:41 ` Amir Goldstein
2017-01-20 8:49 ` Amir Goldstein
2017-01-20 12:03 ` Eryu Guan [this message]
2017-01-20 8:50 ` Jan Kara
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=20170120120347.GX1859@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=amir73il@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=jack@suse.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=sandeen@sandeen.net \
--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