Merge pull request #34345 from kolyshkin/dm-nitpicks

graphdriver/devmapper nitpicks
Upstream-commit: a9aa95ce133fe270db93cee4e59a23ca5a4d3558
Component: engine
This commit is contained in:
Yong Tang
2017-08-01 08:13:23 -07:00
committed by GitHub
4 changed files with 5 additions and 7 deletions

View File

@ -1479,12 +1479,9 @@ func (devices *DeviceSet) closeTransaction() error {
}
func determineDriverCapabilities(version string) error {
/*
* Driver version 4.27.0 and greater support deferred activation
* feature.
*/
// Kernel driver version >= 4.27.0 support deferred removal
logrus.Debugf("devicemapper: driver version is %s", version)
logrus.Debugf("devicemapper: kernel dm driver version is %s", version)
versionSplit := strings.Split(version, ".")
major, err := strconv.Atoi(versionSplit[0])

View File

@ -13,6 +13,7 @@ import (
"golang.org/x/sys/unix"
)
// Same as DM_DEVICE_* enum values from libdevmapper.h
const (
deviceCreate TaskType = iota
deviceReload

View File

@ -8,7 +8,7 @@ package devicemapper
*/
import "C"
// LibraryDeferredRemovalSupport is supported when statically linked.
// LibraryDeferredRemovalSupport tells if the feature is enabled in the build
const LibraryDeferredRemovalSupport = true
func dmTaskDeferredRemoveFct(task *cdmTask) int {

View File

@ -2,7 +2,7 @@
package devicemapper
// LibraryDeferredRemovalSupport is not supported when statically linked.
// LibraryDeferredRemovalSupport tells if the feature is enabled in the build
const LibraryDeferredRemovalSupport = false
func dmTaskDeferredRemoveFct(task *cdmTask) int {