Commit d56a77a6 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Use sync mode in kparx when mapping partitions

Pass -s flag to kpartx to fix a potential race condition when deploying
(ext|ntfs)dump images. Without -s, kpartx will return right after
signaling the device mapper to create the partition block devices. This
does not guarantee that the partitions will have been created when
snf-image will try to use them.
parent 49967718
......@@ -189,7 +189,7 @@ get_api20_arguments() {
map_disk0() {
blockdev="$1"
filesystem_dev_base=$($KPARTX -l -p- $blockdev | \
filesystem_dev_base=$($KPARTX -l -s -p- $blockdev | \
grep -m 1 -- "-1.*$blockdev" | \
$AWK '{print $1}')
if [ -z "$filesystem_dev_base" ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment