]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs_repair: allow realtime files to have the reflink flag set
authorDarrick J. Wong <djwong@kernel.org>
Wed, 3 Jul 2024 21:22:35 +0000 (14:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 9 Jul 2024 22:37:24 +0000 (15:37 -0700)
Now that we allow reflink on the realtime volume, allow that combination
of inode flags if the feature's enabled.  Note that we now allow inodes
to have rtinherit even if there's no realtime volume, since the kernel
has never restricted that.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
repair/dinode.c

index 32c1da7d241dcb3c1bbb022ccc223c80107e12d6..b6ff253cc47e0979a6ced458e8afd3ae2cd3b754 100644 (file)
@@ -3243,7 +3243,8 @@ _("bad (negative) size %" PRId64 " on inode %" PRIu64 "\n"),
                }
 
                if ((flags2 & XFS_DIFLAG2_REFLINK) &&
-                   (flags & (XFS_DIFLAG_REALTIME | XFS_DIFLAG_RTINHERIT))) {
+                   !xfs_has_rtreflink(mp) &&
+                   (flags & XFS_DIFLAG_REALTIME)) {
                        if (!uncertain) {
                                do_warn(
        _("Cannot have a reflinked realtime inode %" PRIu64 "\n"),
@@ -3275,7 +3276,8 @@ _("bad (negative) size %" PRId64 " on inode %" PRIu64 "\n"),
                }
 
                if ((flags2 & XFS_DIFLAG2_COWEXTSIZE) &&
-                   (flags & (XFS_DIFLAG_REALTIME | XFS_DIFLAG_RTINHERIT))) {
+                   !xfs_has_rtreflink(mp) &&
+                   (flags & XFS_DIFLAG_REALTIME)) {
                        if (!uncertain) {
                                do_warn(
        _("Cannot have CoW extent size hint on a realtime inode %" PRIu64 "\n"),