devmapper: error reporting workaround in waitRemove()

Upstream-commit: ad2fbd9e873915d9d09685887eb0afe16b9559a4
Component: engine
This commit is contained in:
Solomon Hykes
2013-10-17 01:49:51 +00:00
parent cff980c7fc
commit d2fc2c3021

View File

@ -553,7 +553,9 @@ func (devices *DeviceSetDM) waitRemove(hash string) error {
for ; i<1000; i+=1 {
devinfo, err := getInfo(devname)
if err != nil {
return err
// If there is an error we assume the device doesn't exist.
// The error might actually be something else, but we can't differentiate.
return nil
}
utils.Debugf("Waiting for removal of %s: exists=%d", devname, devinfo.Exists)
if devinfo.Exists == 0 {