On Thu, Jun 30, 2022 at 05:12:01PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > 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@xxxxxxxxxx> > --- > v2: remove unnecessary clearing of extent counters, we reset them anyway > --- > repair/dinode.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/repair/dinode.c b/repair/dinode.c > index 00de31fb..7610cd45 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")); > Looks good. Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> -- Dave Chinner david@xxxxxxxxxxxxx