mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
overlay: add filesystem check helper
Add filesystem check helper for the upcoming fsck.overlay utility. This helper invoke fsck.overlay to check and optionally repair underlying directories of overlay filesystem. Signed-off-by: zhangyi (F) <yi.zhang@huawei.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
@@ -168,3 +168,17 @@ _require_scratch_overlay_features()
|
||||
|
||||
_scratch_unmount
|
||||
}
|
||||
|
||||
# Helper function to check underlying dirs of overlay filesystem
|
||||
_overlay_fsck_dirs()
|
||||
{
|
||||
local lowerdir=$1
|
||||
local upperdir=$2
|
||||
local workdir=$3
|
||||
shift 3
|
||||
|
||||
[[ ! -x "$FSCK_OVERLAY_PROG" ]] && return 0
|
||||
|
||||
$FSCK_OVERLAY_PROG -o lowerdir=$lowerdir -o upperdir=$upperdir \
|
||||
-o workdir=$workdir $*
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user