Merge pull request #9006 from snitm/thin-pool-improvements

Thin pool improvements
This commit is contained in:
Vincent Batts 2014-11-26 14:44:09 -05:00
commit 4e3563a9b6
2 changed files with 8 additions and 1 deletions

View file

@ -384,7 +384,8 @@ func CreatePool(poolName string, dataFile, metadataFile *os.File, poolBlockSize
}
var cookie uint = 0
if err := task.SetCookie(&cookie, 0); err != nil {
var flags uint16 = DmUdevDisableSubsystemRulesFlag | DmUdevDisableDiskRulesFlag | DmUdevDisableOtherRulesFlag
if err := task.SetCookie(&cookie, flags); err != nil {
return fmt.Errorf("Can't set cookie %s", err)
}
defer UdevWait(cookie)

View file

@ -82,6 +82,12 @@ const (
LoNameSize = C.LO_NAME_SIZE
)
const (
DmUdevDisableSubsystemRulesFlag = C.DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG
DmUdevDisableDiskRulesFlag = C.DM_UDEV_DISABLE_DISK_RULES_FLAG
DmUdevDisableOtherRulesFlag = C.DM_UDEV_DISABLE_OTHER_RULES_FLAG
)
var (
DmGetLibraryVersion = dmGetLibraryVersionFct
DmGetNextTarget = dmGetNextTargetFct