devicemapper: Add helper functions to allow deferred device removal
A lot of time device mapper devices leak across mount namespace which docker does not know about and when docker tries to deactivate/delete device, operation fails as device is open in some mount namespace. Create a mechanism where one can defer the device deactivation/deletion so that docker operation does not fail and device automatically goes away when last reference to it is dropped. Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
parent
1b9b5095ac
commit
64ffdbc701
4 changed files with 46 additions and 0 deletions
|
@ -112,6 +112,7 @@ var (
|
|||
DmUdevGetSyncSupport = dmUdevGetSyncSupportFct
|
||||
DmCookieSupported = dmCookieSupportedFct
|
||||
LogWithErrnoInit = logWithErrnoInitFct
|
||||
DmTaskDeferredRemove = dmTaskDeferredRemoveFct
|
||||
)
|
||||
|
||||
func free(p *C.char) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue