tar2fs: wait a bit

Looks like there's a race condition somewhere: this script
will fail to clean up after itself when considerable background
load is inflicted upon the host it's running on (e.g. LA ~16
on a 8-core, single-disk system).

Note that this commit is NOT enough to win that race
but just a step in the right direction...
This commit is contained in:
Michael Shigorin 2014-09-09 22:21:28 +04:00
parent e238973c04
commit 5542415e19

View File

@ -129,7 +129,7 @@ exit_handler() {
umount ${BOOTFS:+"$BOOTFS"} "$ROOTFS"{/dev,/proc,/sys,}
if [ -n "$LOOPDEV" ]; then
kpartx -d "$LOOPDEV"
kpartx -d -s "$LOOPDEV"
losetup --detach "$LOOPDEV"
fi
rm -r -- "$ROOTFS"