From: Eric Sandeen Date: Thu, 7 Jan 2021 20:59:17 +0000 (-0500) Subject: xfs: don't catch dax+reflink inodes as corruption in verifier X-Git-Tag: v5.11.0-rc0~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1671c6dff77b81ee276112a4bdbcacef8fa68c02;p=thirdparty%2Fxfsprogs-dev.git xfs: don't catch dax+reflink inodes as corruption in verifier Source kernel commit: 207ddc0ef4f413ab1f4e0c1fcab2226425dec293 We don't yet support dax on reflinked files, but that is in the works. Further, having the flag set does not automatically mean that the inode is actually "in the CPU direct access state," which depends on several other conditions in addition to the flag being set. As such, we should not catch this as corruption in the verifier - simply not actually enabling S_DAX on reflinked files is enough for now. Fixes: 4f435ebe7d04 ("xfs: don't mix reflink and DAX mode for now") Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig [darrick: fix the scrubber too] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_inode_buf.c b/libxfs/xfs_inode_buf.c index 6722d5afd..c9bde7ee3 100644 --- a/libxfs/xfs_inode_buf.c +++ b/libxfs/xfs_inode_buf.c @@ -544,10 +544,6 @@ xfs_dinode_verify( if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags & XFS_DIFLAG_REALTIME)) return __this_address; - /* don't let reflink and dax mix */ - if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags2 & XFS_DIFLAG2_DAX)) - return __this_address; - /* COW extent size hint validation */ fa = xfs_inode_validate_cowextsize(mp, be32_to_cpu(dip->di_cowextsize), mode, flags, flags2);