createPool() and reloadPool() should be consistent with the thin-pool
table params they use.
Since createPool() specifies '1 skip_block_zeroing' reloadPool() should
too. Otherwise, if the pool is reloaded (as is done when resizing
loopback devices) block zeroing will be enabled after the reload
completes.
Docker-DCO-1.1-Signed-off-by: Mike Snitzer <snitzer@redhat.com> (github: snitm)
... | ... |
@@ -369,7 +369,7 @@ func reloadPool(poolName string, dataFile, metadataFile *os.File) error { |
369 | 369 |
return fmt.Errorf("Can't get data size %s", err) |
370 | 370 |
} |
371 | 371 |
|
372 |
- params := metadataFile.Name() + " " + dataFile.Name() + " 128 32768" |
|
372 |
+ params := metadataFile.Name() + " " + dataFile.Name() + " 128 32768 1 skip_block_zeroing" |
|
373 | 373 |
if err := task.AddTarget(0, size/512, "thin-pool", params); err != nil { |
374 | 374 |
return fmt.Errorf("Can't add target %s", err) |
375 | 375 |
} |