sapling/eden/fs/inodes/overlay
Adam Simpkins 526088ef62 implement fsck repair logic for the 3 most common error types
Summary:
Implement the repair() logic for InodeDataError, MissingMaterializedInode, and
OrphanInode.

The most common errors we see after an unclean system reboot is an inode file
not being present at all (`MissingMaterializedInode`), or it being present but
empty (`InodeDataError`).  When either of these errors occurs for a directory
it also produces `OrphanInode` errors, as all of the children entries in the
directory are no longer part of the directory hierarchy.

This implements repair logic for these three error types.  The repair behavior
is largely similar to the Python version in `eden/cli/fsck.py`, with some
minor changes to the output paths in the `lost+found/` repair directory.  This
also includes more unit test to better exercise handling when `InodeDataError`
and `MissingMaterializedInode` errors occur inside an orphan subdirectory that
needs to be extracted to `lost+found`

Reviewed By: strager

Differential Revision: D16577696

fbshipit-source-id: 948158c5a0c32b31574d93011281c42051645ad9
2019-08-29 12:45:19 -07:00
..
test implement fsck repair logic for the 3 most common error types 2019-08-29 12:45:19 -07:00
CMakeLists.txt initial C++ fsck implementation 2019-08-12 19:53:44 -07:00
eden_fsck.cpp rely on skip_on_mode_mac rather than hardcoding rules in build-buck-mac.sh 2019-08-22 19:36:24 -07:00
FsOverlay.cpp implement fsck repair logic for the 3 most common error types 2019-08-29 12:45:19 -07:00
FsOverlay.h implement fsck repair logic for the 3 most common error types 2019-08-29 12:45:19 -07:00
overlay.thrift update license headers in thrift files 2019-06-19 17:02:46 -07:00
OverlayChecker.cpp implement fsck repair logic for the 3 most common error types 2019-08-29 12:45:19 -07:00
OverlayChecker.h implement fsck repair logic for the 3 most common error types 2019-08-29 12:45:19 -07:00