generic/062, 520: Don't remove lost+found during cleanup

On older e2fsprogs, fsck command will check lost+found for extX,
so that it will get error if lost+found has been removed during
cleanup.  For example:
----------------------------------------------------------
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Create? no
...
----------------------------------------------------------
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Xiao Yang
2018-12-11 14:36:17 +08:00
committed by Eryu Guan
parent b155c8b87c
commit 2c97b8691d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ echo "*** backup everything"
_backup $tmp.backup1
echo "*** clear out the scratch device"
rm -fr $SCRATCH_MNT/*
rm -rf $(find $SCRATCH_MNT/* | grep -v "lost+found")
echo "AFTER REMOVE" >>$seqres.full
getfattr -L -R -m '.' $SCRATCH_MNT >>$seqres.full
+1 -1
View File
@@ -57,7 +57,7 @@ after=""
clean_dir()
{
_mount_flakey
rm -rf $SCRATCH_MNT/*
rm -rf $(find $SCRATCH_MNT/* | grep -v "lost+found")
sync
_unmount_flakey
}