sync_dev_uevents: Break from the loop if kernel seqnum matches mdev's
Change-Id: I68b1edf48eb7b243647b3e980d989c580015f812 Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4710 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
0b6f2e236d
commit
238251a10b
@ -152,10 +152,8 @@ elif [[ -e /sys/kernel/uevent_helper ]]; then
|
||||
# mdev keeps count of the seqnums on its own on each execution
|
||||
# and saves the count under /dev/mdev.seq. This is then set to
|
||||
# + 1 after the uevents finally settled.
|
||||
while ((timeout--)); do
|
||||
if (($(< /sys/kernel/uevent_seqnum) + 1 != $(< /dev/mdev.seq))); then
|
||||
sleep 1s
|
||||
fi
|
||||
while ((timeout-- && $(< /sys/kernel/uevent_seqnum) + 1 != $(< /dev/mdev.seq))); do
|
||||
sleep 1s
|
||||
done
|
||||
if ((timeout < 0)); then
|
||||
printf '* Events not synced in time, %s devices (%s) may be missing\n' \
|
||||
|
Loading…
Reference in New Issue
Block a user