Whamcloud - gitweb
LU-14710 e2fsck: fix ".." more gracefully if possible
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 28 May 2021 04:57:20 +0000 (22:57 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 15 Dec 2022 22:48:33 +0000 (15:48 -0700)
commit047bfd1edd84b59c2733cf62fbcc66b79715c7f3
tree873b91a1257c4870d20b36adbea6bf2cd2f8a69e
parent50b0b6dd9ff203dd1669438c275c060d0b72926b
LU-14710 e2fsck: fix ".." more gracefully if possible

If the "." entry is corrupted, it will be reset in check_dot().
It is possible that the ".." entry can be recovered from the
directory block instead of also resetting it immediately.  If
it appears that there is a valid ".." entry in the block, allow
that to be used, and let check_dotdot() verify the dirent itself.

When resetting the "." and ".." entries, use EXT2_FT_DIR as the
file type instead of EXT2_FT_UNKNOWN, to avoid extra problems
later can easily be avoided.

Fixup affected tests using the new "repair-test" script that
updates the expect.[12] files from $test.[12].log for the given
tests and re-runs the test to ensure it now passes.

Change-Id: Ia5e579bcf31a9d9ee260d5640de6dbdb60514823
Signed-off-by: Andreas dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/43858
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
e2fsck/pass2.c