Re: Broken O_{D,}SYNC behavior with FICLONE*?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 02, 2020 at 08:52:25PM -0700, Darrick J. Wong wrote:
> Hi,
> 
> I have a question for everyone-- do FICLONE and FICLONERANGE count as a
> "write operation" for the purposes of reasoning about O_SYNC and
> O_DSYNC?

I'd say yes, because we are changing metadata that is used to
directly reference the data in the file. O_DSYNC implies all the
metadata needed to access the data is on stable storage when the
operation returns....

> So, that's inconsistent behavior and I want to know if remap_file_range
> is broken or if we all just don't care about O_SYNC for these fancy
> IO accelerators?

Perhaps we should pay attention to the NFSD implementation of CloneFR -
if the operation is sync then it will run fsync on the destination
and commit_metadata on the source inode. See
nfsd4_clone_file_range().

So, yeah, I think clone operations need to pay attention to
O_DSYNC/O_SYNC/IS_SYNC()....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux