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. Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> Signed-off-by: Chandan Babu R <chandan.babu@xxxxxxxxxx> --- repair/dino_chunks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/repair/dino_chunks.c b/repair/dino_chunks.c index 11b0eb5f..80c52a43 100644 --- a/repair/dino_chunks.c +++ b/repair/dino_chunks.c @@ -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); -- 2.35.1