e2fsprogs/tests/f_rebuild_csum_rootdir
Andreas Dilger 6b0e3bd7bd e2fsck: no parent lookup in disconnected dir
Don't call into ext2fs_get_pathname() to do a name lookup for a
disconnected directory, since the directory block traversal in
pass1 has already scanned all of the leaf blocks and never finds
the entry, always printing "???".  If the name entry had been
found earlier, the directory would not be disconnected in pass3.

Instead, lookup ".." and print the parent name in the prompt, and
then do not search for the current directory name at all.  This
avoids a useless full directory scan for each disconnected entry,
which can potentially be slow if the parent directory is large.

Separate the recursively looped directory case to a new error code,
since it is a different problem that should use its own descriptive
text, and a proper pathname can be shown in this case.

Lustre-bug-Id: https://jira.whamcloud.com/browse/LU-15330
Change-Id: If17a92689f24f365ca1fbe5c837e7d5f383ebbe5
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2022-05-02 23:40:10 -04:00
..
expect.1 e2fsck: no parent lookup in disconnected dir 2022-05-02 23:40:10 -04:00
expect.2 e2fsck: write dir blocks after new inode when reconstructing root/lost+found 2014-07-26 17:14:40 -04:00
image.gz e2fsck: write dir blocks after new inode when reconstructing root/lost+found 2014-07-26 17:14:40 -04:00
name tests: shorten test descriptions to fit in 80 columns 2017-10-15 16:23:24 -04:00