Browse code

devmapper: Ensure we shut down thin pool cleanly.

The change in commit a9fa1a13c3b0a654a96be01ff7ec19e8009b2094
made us only deactivate devices that were mounted. Unfortunately
this made us not deactivate the base device. Which caused
us to not be able to deactivate the pool.

This fixes that by always just deactivating the base device.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

Alexander Larsson authored on 2014/03/28 23:58:14
Showing 1 changed files
... ...
@@ -821,6 +821,10 @@ func (devices *DeviceSet) Shutdown() error {
821 821
 		info.lock.Unlock()
822 822
 	}
823 823
 
824
+	if err := devices.deactivateDevice(""); err != nil {
825
+		utils.Debugf("Shutdown deactivate base , error: %s\n", err)
826
+	}
827
+
824 828
 	if err := devices.deactivatePool(); err != nil {
825 829
 		utils.Debugf("Shutdown deactivate pool , error: %s\n", err)
826 830
 	}