xfs_repair: Search for conflicts in certain inode tree when processing uncertain inodes
PATCH v2 1/1 xfs_repair: Search for conflicts in certain inode tree when processing uncertain inodes
The following are the list of steps executed by phase 3 w.r.t processing inode chunks obtained from the uncertain inode chunk tree:
1. For each inode chunk in the uncertain inode chunk tree
1.1. Verify inodes in the chunk.
1.2. If most of the inodes in the chunk are found to be valid,
1.2.1. If there are no overlapping inode chunks in the uncertain inode
chunk tree.
1.2.1.1. Add inode chunk to certain inode tree.
1.3. Remove inode chunk from uncertain inode chunk tree.
The check in 1.2.1 is bound to fail since the inode chunk being processed was obtained from the uncertain inode chunk tree and it continues to be there until step 1.3 is executed.
This patch changes step 1.2.1 to check for overlapping inode chunks in the certain inode chunk tree, since adding the new inode chunk can cause overlapping entries to be introduced.
--- repair/dino_chunks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
repair/dino_chunks.c +1 -2
@@ -229,8 +229,7 @@ verify_inode_chunk(xfs_mount_t *mp,/* * ok, put the record into the tree, if no conflict. */ -if (find_uncertain_inode_rec (agno, -XFS_AGB_TO_AGINO (mp, start_agbno))) +if (find_inode_rec (mp, agno,XFS_AGB_TO_AGINO (mp, start_agbno)))return (0 ); start_agino =XFS_AGB_TO_AGINO (mp, start_agbno);
Signature · 1 line
2.35.1