Skip to content

Commit ec46f71

Browse files
author
Christian Rebischke
authored
Merge pull request #63 from coderobe/patch-4
write_zeroes: flush buffers before writing zeroes
2 parents 25aeda9 + 734c592 commit ec46f71

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

provision/write_zeroes.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
set -e
44
set -x
55

6+
# Make sure unwritten data has been flushed beforehand
7+
sync
68
# Write zeros to improve virtual disk compaction.
79
zerofile=$(/usr/bin/mktemp /zerofile.XXXXX)
810
dd if=/dev/zero of="$zerofile" bs=1M || true

0 commit comments

Comments
 (0)