aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-09-12 12:40:04 -0700
committerCarlos Maiolino <cem@kernel.org>2023-10-05 14:57:20 +0200
commit75325b82a66185ae9d0360193a271640e8c9a3ea (patch)
treef14f63e8f6f2f14eb239883eccdd53b39e840a28
parent92c1851160c5142d4bd8f4d25c28322024fdf24b (diff)
downloadxfsprogs-dev-75325b82a66185ae9d0360193a271640e8c9a3ea.tar.gz
xfs_repair: set aformat and anextents correctly when clearing the attr fork
Ever since commit b42db0860e130 ("xfs: enhance dinode verifier"), we've required that inodes with zero di_forkoff must also have di_aformat == EXTENTS and di_naextents == 0. clear_dinode_attr actually does this, but then both callers inexplicably set di_format = LOCAL. That in turn causes a verifier failure the next time the xattrs of that file are read by the kernel. Get rid of the bogus field write. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Bill O'Donnell <bodonnel@redhat.com> Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r--repair/dinode.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/repair/dinode.c b/repair/dinode.c
index e534a01b50..c10dd1fa32 100644
--- a/repair/dinode.c
+++ b/repair/dinode.c
@@ -2078,7 +2078,6 @@ process_inode_attr_fork(
if (!no_modify) {
do_warn(_(", clearing attr fork\n"));
*dirty += clear_dinode_attr(mp, dino, lino);
- dino->di_aformat = XFS_DINODE_FMT_LOCAL;
ASSERT(*dirty > 0);
} else {
do_warn(_(", would clear attr fork\n"));
@@ -2135,7 +2134,6 @@ process_inode_attr_fork(
/* clear attributes if not done already */
if (!no_modify) {
*dirty += clear_dinode_attr(mp, dino, lino);
- dino->di_aformat = XFS_DINODE_FMT_LOCAL;
} else {
do_warn(_("would clear attr fork\n"));
}