Browse code

devmapper: Enable skip_block_zeroing

This makes the device mapper not zero out blocks allocated on the
thinp device. This is safe in our use case, as we access the device
via a filesystem that doesn't leak any uninitialized data to userspace.

This partially helps with https://github.com/dotcloud/docker/issues/3280
and should generally improve preformance on the devicemapper backend.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

Alexander Larsson authored on 2014/02/09 15:25:34
Showing 1 changed files
... ...
@@ -324,7 +324,7 @@ func createPool(poolName string, dataFile, metadataFile *osFile) error {
324 324
 		return fmt.Errorf("Can't get data size")
325 325
 	}
326 326
 
327
-	params := metadataFile.Name() + " " + dataFile.Name() + " 128 32768"
327
+	params := metadataFile.Name() + " " + dataFile.Name() + " 128 32768 1 skip_block_zeroing"
328 328
 	if err := task.AddTarget(0, size/512, "thin-pool", params); err != nil {
329 329
 		return fmt.Errorf("Can't add target")
330 330
 	}