Skip to content

Commit 207ddc0

Browse files
Eric Sandeendjwong
authored andcommitted
xfs: don't catch dax+reflink inodes as corruption in verifier
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: 4f435eb ("xfs: don't mix reflink and DAX mode for now") Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> [darrick: fix the scrubber too] Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
1 parent a5336d6 commit 207ddc0

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

fs/xfs/libxfs/xfs_inode_buf.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,6 @@ xfs_dinode_verify(
547547
if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags & XFS_DIFLAG_REALTIME))
548548
return __this_address;
549549

550-
/* don't let reflink and dax mix */
551-
if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags2 & XFS_DIFLAG2_DAX))
552-
return __this_address;
553-
554550
/* COW extent size hint validation */
555551
fa = xfs_inode_validate_cowextsize(mp, be32_to_cpu(dip->di_cowextsize),
556552
mode, flags, flags2);

fs/xfs/scrub/inode.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,6 @@ xchk_inode_flags2(
185185
if ((flags & XFS_DIFLAG_REALTIME) && (flags2 & XFS_DIFLAG2_REFLINK))
186186
goto bad;
187187

188-
/* dax and reflink make no sense, currently */
189-
if ((flags2 & XFS_DIFLAG2_DAX) && (flags2 & XFS_DIFLAG2_REFLINK))
190-
goto bad;
191-
192188
/* no bigtime iflag without the bigtime feature */
193189
if (xfs_dinode_has_bigtime(dip) &&
194190
!xfs_sb_version_hasbigtime(&mp->m_sb))

0 commit comments

Comments
 (0)