Skip to content

Commit

Permalink
Merge pull request #63 from coderobe/patch-4
Browse files Browse the repository at this point in the history
write_zeroes: flush buffers before writing zeroes
  • Loading branch information
Christian Rebischke authored Oct 15, 2019
2 parents 25aeda9 + 734c592 commit ec46f71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions provision/write_zeroes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -e
set -x

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

0 comments on commit ec46f71

Please sign in to comment.