]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: allow inodes to have the realtime and reflink flags
authorDarrick J. Wong <djwong@kernel.org>
Mon, 24 Feb 2025 18:21:54 +0000 (10:21 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 25 Feb 2025 17:15:59 +0000 (09:15 -0800)
Source kernel commit: c3d3605f9661a2451c437a037d338dc79fb78f37

Now that we can share blocks between realtime files, allow this
combination.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_inode_buf.c

index 0be0625857002c6554f931090a178e124152c5ce..a7774fc32e2755d350f976e06336f31ee638626f 100644 (file)
@@ -745,7 +745,8 @@ xfs_dinode_verify(
                return __this_address;
 
        /* don't let reflink and realtime mix */
-       if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags & XFS_DIFLAG_REALTIME))
+       if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags & XFS_DIFLAG_REALTIME) &&
+           !xfs_has_rtreflink(mp))
                return __this_address;
 
        /* COW extent size hint validation */