Unverified Commit 7b8dfbb9 authored by Robin Broda's avatar Robin Broda Committed by GitHub
Browse files

write_zeroes: flush buffers before writing zeroes

this avoids spurious failures with e.g. btrfs' metadata backing store when alternative filesystems are used (i.e. #62)
parent c6d4ffc2
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment