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)
This commit is contained in:
Mike Snitzer 2014-11-13 13:37:47 -05:00
parent 2b10749cdd
commit e49567ba72

View file

@ -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
if !foundBlkDiscard && devices.dataDevice != "" {
if !foundBlkDiscard && (devices.dataDevice != "" || devices.thinPoolDevice != "") {
devices.doBlkDiscard = false
}