]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: always perform extended xattr checks on uncertain inodes
authorDarrick J. Wong <djwong@kernel.org>
Mon, 5 Jun 2023 15:37:30 +0000 (08:37 -0700)
committerCarlos Maiolino <cem@kernel.org>
Wed, 12 Jul 2023 07:15:18 +0000 (09:15 +0200)
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 <djwong@kernel.org>
Reviewed-by: Pavel Reichl <preichl@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
repair/dino_chunks.c

index 64ce2a323c8dfa222db67904ea5655a1a5e06beb..171756818a6a3ab5c509f9f297b86811ef3eb625 100644 (file)
@@ -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();
                        }