diff mbox

Client never uses DATA_SYNC

Message ID 20141120054813.GA32361@infradead.org (mailing list archive)
State New, archived
Headers show

Commit Message

Christoph Hellwig Nov. 20, 2014, 5:48 a.m. UTC
On Tue, Nov 18, 2014 at 12:02:10PM -0500, J. Bruce Fields wrote:
> On Thu, Nov 06, 2014 at 11:26:37PM -0800, Christoph Hellwig wrote:
> > Note that for filesystems natively implementing the change attribute
> > (btrfs, XFSv5 and ext4 with a mount option) there is no difference anyway,
> 
> Is there something special I have to do to get this on xfs?

You need to create a version 5 filesystem.  For this your need fairly
recent xfsprogs (e.g. RHEL7ish), and create the filesystem using

# mkfs.xf -m crc=1 /dev/device

You probably also want the untested patch below to proper initialize
the version on inodes read from disk:

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index ec6dcdc..c1e2700 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -1277,6 +1277,9 @@  xfs_setup_inode(
 	inode->i_ctime.tv_nsec	= ip->i_d.di_ctime.t_nsec;
 	xfs_diflags_to_iflags(inode, ip);
 
+	if (xfs_sb_version_hascrc(&ip->i_mount->m_sb))
+		 inode->i_version = ip->i_d.di_changecount;
+
 	ip->d_ops = ip->i_mount->m_nondir_inode_ops;
 	lockdep_set_class(&ip->i_lock.mr_lock, &xfs_nondir_ilock_class);
 	switch (inode->i_mode & S_IFMT) {