Whamcloud - gitweb
LU-15330 e2fsck: no parent lookup in disconnected dir
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 8 Dec 2021 07:35:04 +0000 (00:35 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 19 Apr 2022 00:16:07 +0000 (18:16 -0600)
commite38c2889360ccb705495c2fe36a526c39fbad951
treeaf05bb2cf23cdae4de053082792d26ecf1ebfeb0
parent4410a636b68028da99640e7339f6ce7262bad6e7
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