Merge pull request #16381 from rhvgoyal/deferred_deletion

devicemapper: Implement deferred deletion capability
This commit is contained in:
Alexander Morozov 2015-10-07 09:27:41 -07:00
commit d3aed6260a

View file

@ -750,7 +750,11 @@ func DeleteDevice(poolName string, deviceID int) error {
return fmt.Errorf("Can't set message %s", err) return fmt.Errorf("Can't set message %s", err)
} }
dmSawBusy = false
if err := task.run(); err != nil { if err := task.run(); err != nil {
if dmSawBusy {
return ErrBusy
}
return fmt.Errorf("Error running DeleteDevice %s", err) return fmt.Errorf("Error running DeleteDevice %s", err)
} }
return nil return nil