storage: Force sync after preparing volatile.img
This makes possible to release d-m partitions devices sooner (so avoid race with kpartx).
This commit is contained in:
parent
ea68c6a766
commit
8d0863d40f
@ -31,6 +31,7 @@ kpartx -s -a "$FILENAME"
|
||||
loopdev=`losetup -j "$FILENAME"|tail -n 1 |cut -d: -f1`
|
||||
looppart=`echo $loopdev|sed 's:dev:dev/mapper:'`
|
||||
mkswap -f ${looppart}p1 > /dev/null
|
||||
sync
|
||||
kpartx -s -d ${loopdev}
|
||||
losetup -d ${loopdev} || :
|
||||
chown --reference `dirname "$FILENAME"` "$FILENAME"
|
||||
|
Loading…
Reference in New Issue
Block a user