]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs_repair: set aformat and anextents correctly when clearing the attr fork
authorDarrick J. Wong <djwong@kernel.org>
Tue, 12 Sep 2023 19:40:04 +0000 (12:40 -0700)
committerCarlos Maiolino <cem@kernel.org>
Thu, 5 Oct 2023 12:57:20 +0000 (14:57 +0200)
commit75325b82a66185ae9d0360193a271640e8c9a3ea
treef14f63e8f6f2f14eb239883eccdd53b39e840a28
parent92c1851160c5142d4bd8f4d25c28322024fdf24b
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>
repair/dinode.c