[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-btrfs
Subject: Re: [PATCH] btrfs: make reflinks respect O_SYNC O_DSYNC and S_SYNC flags
From: Filipe Manana <fdmanana () kernel ! org>
Date: 2021-03-31 11:07:26
Message-ID: CAL3q7H4fxAsmY9a0QtWGRu1Si6oUgnazctSn=HzjmBvxr0R2zw () mail ! gmail ! com
[Download RAW message or body]
On Mon, Mar 29, 2021 at 7:49 PM David Sterba <dsterba@suse.cz> wrote:
>
> On Tue, Mar 23, 2021 at 06:39:49PM +0000, fdmanana@kernel.org wrote:
> > From: Filipe Manana <fdmanana@suse.com>
> >
> > If we reflink to or from a file opened with O_SYNC/O_DSYNC or to/from a
> > file that has the S_SYNC attribute set, we totally ignore that and do not
> > durably persist the reflink changes. Since a reflink can change the data
> > readable from a file (and mtime/ctime, or a file size), it makes sense to
> > durably persist (fsync) the source and destination files/ranges.
> >
> > This was previously discussed at:
> >
> > https://lore.kernel.org/linux-btrfs/20200903035225.GJ6090@magnolia/
> >
> > The recently introduced test case generic/628, from fstests, exercises
> > these scenarios and currently fails without this change.
> >
> > So make sure we fsync the source and destination files/ranges when either
> > of them was opened with O_SYNC/O_DSYNC or has the S_SYNC attribute set,
> > just like XFS already does.
> >
> > Signed-off-by: Filipe Manana <fdmanana@suse.com>
>
> Added to misc-next, thanks.
Can you squash the following diff into it?
https://pastebin.com/raw/ARSSDDxd
Or if you prefer I send a v2, it's fine as well. Let me know, thanks.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic