multipath: Fix kpartx and udevd race
authorBenjamin Marzinski <bmarzins@redhat.com>
Sat, 12 Jan 2013 06:04:52 +0000 (00:04 -0600)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sat, 12 Jan 2013 12:37:50 +0000 (13:37 +0100)
commite35838491196223361200fb2a2066f2969613fd8
tree96559f78cfd6ae2ed19fa737f8ed923ea265ff51
parent7ec491fc9293eaa5af973c9a48259d437f51a4ad
multipath: Fix kpartx and udevd race

Sometimes when kpartx is used to view partition data on disk image files,
udev still has the loop device open when kpartx is trying to tear it down.
This causes the LOOP_CLR_FD ioctl to fail with EBUSY.  kpartx now retries
in this case.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
kpartx/lopart.c