From: Darrick J. Wong Date: Tue, 25 Oct 2016 01:46:51 +0000 (+1100) Subject: xfs: don't mix reflink and DAX mode for now X-Git-Tag: v4.9.0-rc1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=378ed4e785ae4ed5a94c923c25bacd340247c1ca;p=thirdparty%2Fxfsprogs-dev.git xfs: don't mix reflink and DAX mode for now Source kernel commit: 4f435ebe7d0422af61cdcddbbcc659888645a1e1 Since we don't have a strategy for handling both DAX and reflink, for now we'll just prohibit both being set at the same time. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- diff --git a/libxfs/xfs_inode_buf.c b/libxfs/xfs_inode_buf.c index ed34eceba..4796a592b 100644 --- a/libxfs/xfs_inode_buf.c +++ b/libxfs/xfs_inode_buf.c @@ -416,6 +416,10 @@ xfs_dinode_verify( if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags & XFS_DIFLAG_REALTIME)) return false; + /* don't let reflink and dax mix */ + if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags2 & XFS_DIFLAG2_DAX)) + return false; + return true; }