summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-04-12 19:12:39 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2010-04-12 19:12:39 +0200
commita17127c46d0a635b9af17a2ef20c3a44bb3797e1 (patch)
tree4b4d96f16ef58dd16664322abb724747c6590ed6
parent836b1252b245b124af45499720d83e8b583d79d4 (diff)
perform udevadm settle to avoid raceconditions where the device would not be ready in time. fixes http://mailman.archlinux.org/pipermail/arch-releng/2010-April/000974.html
-rw-r--r--src/core/libs/lib-blockdevices-filesystems.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
index d701105..9a7d5d4 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -749,6 +749,10 @@ process_filesystem ()
lvcreate -L $fs_params $fs_opts -n $fs_label `sed 's#/dev/mapper/##' <<< $part` >$LOG 2>&1; ret=$? ;; #$opts is usually something like -L 10G # Strip '/dev/mapper/' part because device file may not exist. TODO: do i need to activate them?
# don't handle anything else here, we will error later
esac
+ # The udevadm settle is a workaround for a bug/racecondition in cryptsetup. See:
+ # http://mailman.archlinux.org/pipermail/arch-releng/2010-April/000974.html
+ # It may not be needed (anymore), or not after every type of FS, but we're rather safe then sorry. and it seems to always return in less then a second
+ udevadm settle
BLOCK_ROLLBACK_USELESS=0
[ "$ret" -gt 0 ] && { show_warning "process_filesystem error" "Error creating filesystem $fs_type on $part."; return 1; }
sleep 2