Browse Source

devmapper: disable discards by default if dm.thinpooldev was specified

User may still enable discards by setting dm.blkdiscard=true

Docker-DCO-1.1-Signed-off-by: Mike Snitzer <snitzer@redhat.com> (github: snitm)
Mike Snitzer 10 years ago
parent
commit
e49567ba72
1 changed files with 1 additions and 1 deletions
  1. 1 1
      daemon/graphdriver/devmapper/deviceset.go

+ 1 - 1
daemon/graphdriver/devmapper/deviceset.go

@@ -1317,7 +1317,7 @@ func NewDeviceSet(root string, doInit bool, options []string) (*DeviceSet, error
 	}
 	}
 
 
 	// By default, don't do blk discard hack on raw devices, its rarely useful and is expensive
 	// By default, don't do blk discard hack on raw devices, its rarely useful and is expensive
-	if !foundBlkDiscard && devices.dataDevice != "" {
+	if !foundBlkDiscard && (devices.dataDevice != "" || devices.thinPoolDevice != "") {
 		devices.doBlkDiscard = false
 		devices.doBlkDiscard = false
 	}
 	}