diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-12 13:26:33 -0500 |
---|---|---|
committer | Eric Sandeen <sandeen@redhat.com> | 2022-07-12 13:26:33 -0500 |
commit | b83b2ec0128ac7a11b50a9ee594d19105c06c579 (patch) | |
tree | 63041adcf394eb9fd48d3323e080f7e6a6501483 | |
parent | baf8a5df8a0c6539818a3f78a68d22648c022e50 (diff) | |
download | xfsprogs-dev-b83b2ec0128ac7a11b50a9ee594d19105c06c579.tar.gz |
xfs_repair: clear DIFLAG2_NREXT64 when filesystem doesn't support nrext64
Clear the nrext64 inode flag if the filesystem doesn't have the nrext64
feature enabled in the superblock.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r-- | repair/dinode.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/repair/dinode.c b/repair/dinode.c index 00de31fb12..7610cd4565 100644 --- a/repair/dinode.c +++ b/repair/dinode.c @@ -2690,6 +2690,19 @@ _("bad (negative) size %" PRId64 " on inode %" PRIu64 "\n"), } } + if (xfs_dinode_has_large_extent_counts(dino) && + !xfs_has_large_extent_counts(mp)) { + if (!uncertain) { + do_warn( + _("inode %" PRIu64 " is marked large extent counts but file system does not support large extent counts\n"), + lino); + } + flags2 &= ~XFS_DIFLAG2_NREXT64; + + if (!no_modify) + *dirty = 1; + } + if (!verify_mode && flags2 != be64_to_cpu(dino->di_flags2)) { if (!no_modify) { do_warn(_("fixing bad flags2.\n")); |