]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: don't mix reflink and DAX mode for now
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 25 Oct 2016 01:46:51 +0000 (12:46 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 25 Oct 2016 01:46:51 +0000 (12:46 +1100)
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 <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_inode_buf.c

index ed34ecebaa53f70b9ea3818bfabbc37767742049..4796a592b0af1374f07b3d3fefce798b1128a3ce 100644 (file)
@@ -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;
 }