From dafa78c9ad8ce5b7cb836b0fb16d36b63fd6be69 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 5 Jun 2023 08:37:30 -0700 Subject: [PATCH] xfs_repair: always perform extended xattr checks on uncertain inodes When we're processing uncertain inodes, we need to perform the extended checks on the xattr structure, because the processing might decide that an uncertain inode is in fact a certain inode, and to restore it to the filesystem. If that's the case, xfs_repair fails to catch problems in the attr structure. Signed-off-by: Darrick J. Wong Reviewed-by: Pavel Reichl Signed-off-by: Carlos Maiolino --- repair/dino_chunks.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/repair/dino_chunks.c b/repair/dino_chunks.c index 64ce2a323..171756818 100644 --- a/repair/dino_chunks.c +++ b/repair/dino_chunks.c @@ -1287,10 +1287,12 @@ process_uncertain_aginodes(xfs_mount_t *mp, xfs_agnumber_t agno) * process the inode record we just added * to the good inode tree. The inode * processing may add more records to the - * uncertain inode lists. + * uncertain inode lists. always process the + * extended attribute structure because we might + * decide that some inodes are still in use */ if (process_inode_chunk(mp, agno, igeo->ialloc_inos, - nrec, 1, 0, 0, &bogus)) { + nrec, 1, 0, 1, &bogus)) { /* XXX - i/o error, we've got a problem */ abort(); } -- 2.47.3