devicemapper: Create helpers to cancel deferred deactivation

If a device has been scheduled for deferred deactivation and container
is started again and we need to activate device again, we need to cancel
the deferred deactivation which is already scheduled on the device.

Create a method for the same.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 20b38f427aa05186bd09c8c4201dcc95ed56aa46
Component: engine
This commit is contained in:
Vivek Goyal
2015-04-21 18:14:59 -04:00
parent be8151e80b
commit f0bbbffba0
2 changed files with 36 additions and 0 deletions

View File

@ -22,6 +22,10 @@ func DevmapperLogCallback(level C.int, file *C.char, line C.int, dm_errno_or_cla
if strings.Contains(msg, "File exists") {
dmSawExist = true
}
if strings.Contains(msg, "No such device or address") {
dmSawEnxio = true
}
}
if dmLogger != nil {