Delay before destroying loopback devices
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 3 Jun 2011 21:13:25 +0000 (14:13 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 3 Jun 2011 21:38:25 +0000 (14:38 -0700)
commit608860b6d06aaaa647e03fc3f3fc1b49f025155e
tree7dc31fbe8f463eeaf8b29790b0b9976560d2662d
parent36391312afdfac5584ca40ef1af7721108ce4c20
Delay before destroying loopback devices

Generally I don't approve of just adding an arbitrary delay to
avoid a problem but in this case I'm going to let it slide.  We
may need to delay briefly after 'zpool destroy' returns to ensure
the loopback devices are closed.  If they aren't closed than
losetup -d will not be able to destroy them.  Unfortunately,
there's no easy state the check so we'll have to make due with
a simple delay.
scripts/zpool-config/lo-raid0.sh
scripts/zpool-config/lo-raid10.sh
scripts/zpool-config/lo-raidz.sh
scripts/zpool-config/lo-raidz2.sh