From: "Lv Fei(吕飞)" <feilv@asrmicro.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: "miklos@szeredi.hu" <miklos@szeredi.hu>,
"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Xu Lianghu(徐良虎)" <lianghuxu@asrmicro.com>
Subject: 答复: [PATCH V2] ovl: fsync after metadata copy-up via mount option "fsync=strict"
Date: Mon, 26 Aug 2024 06:56:10 +0000 [thread overview]
Message-ID: <5be64ae3b75e413fa47c9ecb2c4a359a@exch01.asrmicro.com> (raw)
In-Reply-To: <CAOQ4uxiDokEQ0ZET+adP_CpvvTCRRLTcVb9d5mYAmM1q7y2PnQ@mail.gmail.com>
> 发件人: Amir Goldstein [mailto:amir73il@gmail.com]
> 发送时间: 2024年8月23日 19:43
> 收件人: Lv Fei(吕飞) <feilv@asrmicro.com>
> 抄送: miklos@szeredi.hu; linux-unionfs@vger.kernel.org; linux-kernel@vger.kernel.org; Xu Lianghu(徐良虎) <lianghuxu@asrmicro.> com>
> 主题: Re: [PATCH V2] ovl: fsync after metadata copy-up via mount option "fsync=strict"
>
> On Fri, Aug 23, 2024 at 11:51 AM Amir Goldstein <amir73il@gmail.com> wrote:
> >
> > On Mon, Jul 22, 2024 at 3:56 PM Amir Goldstein <amir73il@gmail.com> wrote:
> > >
> > > On Mon, Jul 22, 2024 at 1:14 PM Fei Lv <feilv@asrmicro.com> wrote:
> > > >
> > > > For upper filesystem which does not enforce ordering on storing of
> > > > metadata changes(e.g. ubifs), when overlayfs file is modified for
> > > > the first time, copy up will create a copy of the lower file and
> > > > its parent directories in the upper layer. Permission lost of the
> > > > new upper parent directory was observed during power-cut stress test.
> > > >
> > > > Fix by adding new mount opion "fsync=strict", make sure
There is a typo here, "opion" should be "option", please help correct before merge.
> > > > data/metadata of copied up directory written to disk before
> > > > renaming from tmp to final destination.
> > > >
> > > > Signed-off-by: Fei Lv <feilv@asrmicro.com>
> > >
> > > Reviewed-by: Amir Goldstein <amir73il@gmail.com>
> > >
> > > but I'd also like to wait for an ACK from Miklos on this feature.
> > >
> > > As for timing, we are in the middle of the merge window for
> > > 6.11-rc1, so we have some time before this can be considered for 6.12.
> > > I will be on vacation for most of this development cycle, so either
> > > Miklos will be able to queue it for 6.12 or I may be able to do near
> > > the end of the 6.11 cycle.
> > >
> >
> > Miklos,
> >
> > Please let me know what you think of this approach to handle ubifs upper.
> > If you like it, I can queue this up for v6.12.
> >
> > Thanks,
> > Amir.
> >
> > >
> > > > ---
> > > > V1 -> V2:
> > > > 1. change open flags from "O_LARGEFILE | O_WRONLY" to "O_RDONLY".
> > > > 2. change mount option to "fsync=ordered/strict/volatile".
> > > > 3. ovl_should_sync_strict() implies ovl_should_sync().
> > > > 4. remove redundant ovl_should_sync_strict from ovl_copy_up_meta_inode_data.
> > > > 5. update commit log.
> > > > 6. update documentation overlayfs.rst.
> > > >
>
> Hi Fei,
>
> I started to test this patch and it occured to me that we have no test coverage for the "volatile" feature.
>
> Filesystem durability tests are not easy to write and I know that you tested your own use case, so I will not ask you to write a regression test as a condition for merge, but if you are willing to help, it would be very nice to add this test coverage.
OK, I can have a try, need some time to study test suite. This is a new thing for me.
>
> There is already one overlayfs test in fstests (overlay/078) which tests behavior of overlayfs copy up during power cut (a.k.a shutdown).
Do you mean overlay/078 in kernel/git/brauner/xfstests-dev.git ?
>
> One thing that I do request is that you confirm that you tested that the legacy "volatile" mount option still works as before.
Yes, I tested basic function of "volatile" mount option with this patch.
> I saw that you took care of preserving the legacy mount option in display, which is good practice.
>
> Thanks,
> Amir.
Thanks,
Fei
next prev parent reply other threads:[~2024-08-26 7:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-22 10:14 [PATCH V2] ovl: fsync after metadata copy-up via mount option "fsync=strict" Fei Lv
2024-07-22 13:56 ` Amir Goldstein
2024-08-23 9:51 ` Amir Goldstein
2024-08-23 11:42 ` Amir Goldstein
2024-08-26 6:56 ` Lv Fei(吕飞) [this message]
2024-08-26 13:03 ` Amir Goldstein
2024-08-26 15:59 ` Miklos Szeredi
2024-08-27 8:46 ` Amir Goldstein
2024-08-29 10:29 ` Amir Goldstein
2024-08-29 12:51 ` Miklos Szeredi
2024-08-29 16:23 ` Amir Goldstein
2024-08-30 9:26 ` Amir Goldstein
2024-08-30 11:52 ` 答复: " Lv Fei(吕飞)
2024-08-30 12:23 ` Amir Goldstein
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=5be64ae3b75e413fa47c9ecb2c4a359a@exch01.asrmicro.com \
--to=feilv@asrmicro.com \
--cc=amir73il@gmail.com \
--cc=lianghuxu@asrmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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