Whamcloud - gitweb
LU-15330 e2fsck: no parent lookup in disconnected dir 85/45785/2
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 8 Dec 2021 07:35:04 +0000 (00:35 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 17 Dec 2021 05:05:29 +0000 (05:05 +0000)
commit92846e036c76b820445822edc80fc9cff0310a5d
tree3c95a285aebd85008ce0c6237cf772cd82545cf6
parent53e89f073a37328ebed210045c8be76ff947003f
LU-15330 e2fsck: no parent lookup in disconnected dir

Don't call 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 not
found the relevant entry.  If it had been found the directory
would not be disconnected in pass3.

Instead, print the ".." directory name in the prompt directly.
This avoids a potentially lengthy directory traversal for each
disconnected entry if the previous parent is large that never
finds the entry.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If17a92689f24f365ca1fbe5c837e7d5f383ebbe5
Reviewed-on: https://review.whamcloud.com/45785
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
13 files changed:
e2fsck/pass3.c
e2fsck/problem.c
e2fsck/problem.h
tests/f_bad_encryption/expect.1
tests/f_badroot/expect.1
tests/f_encrypted_lpf/expect.1
tests/f_expand/expect.1.gz
tests/f_lpf2/expect.1
tests/f_noroot/expect.1
tests/f_orphan_dotdot_ft/expect.1
tests/f_rebuild_csum_rootdir/expect.1
tests/f_recnect_bad/expect.1
tests/f_resize_inode_meta_bg/expect.1