Description
When there are unattached inodes, e2fsck inserts entries into lost+found after a full linear search of the directory to find a slot for the name. This means that if there are a lot of unattached inodes due to corruption of the OST object directories, it is a very lengthy O(n^2) operation to reattach all inodes.
It would be much more efficient to keep a cursor pointing to the last leaf block in the directory in which an entry was inserted. Since e2fsck is not deleting entries from lost+found, and because the entries are always getting longer (due to scanning in increasing inode number order) there is no value to search earlier blocks again. This would make lost+found insertion O(1) and significantly improve e2fsck performance in this case.
Attachments
Issue Links
- is related to
-
LU-8465 parallel e2fsck performance at scale
- Resolved