diff options
author | Mike Frysinger <vapier@chromium.org> | 2015-09-10 16:18:03 -0400 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-11 18:36:29 -0700 |
commit | 82dec09bd5098715ddf9cd7d2e4abe87606d5249 (patch) | |
tree | 09bdaa079fc39fa8fa8bdbb64320b058ca73815d | |
parent | df9bf4eef39afffb296ed5332fdecdc7af01813f (diff) | |
download | vboot-82dec09bd5098715ddf9cd7d2e4abe87606d5249.tar.gz |
image_signing: use sparse partition extraction
Often the partitions we extract have extra space in them, but the dd
utility will still write out the excess zeros. That can mean we write
out hundreds of megs of data which could otherwise be skipped. We thus
waste a good amount of I/O and storage.
For now, only use this flag when extracting a partition to a new file
as this should be safe (there's no pre-existing data to clobber/merge).
BUG=chromium:530730
TEST=`./signing_unittests.py` passes
BRANCH=None
Change-Id: Ic32665cf7c38fc0a5efc3f8b227fa8ff408ca9e3
Reviewed-on: https://chromium-review.googlesource.com/299450
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David Riley <davidriley@chromium.org>
-rw-r--r-- | scripts/image_signing/common_minimal.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/image_signing/common_minimal.sh b/scripts/image_signing/common_minimal.sh index 576d2d8f..be3d2adc 100644 --- a/scripts/image_signing/common_minimal.sh +++ b/scripts/image_signing/common_minimal.sh @@ -229,7 +229,7 @@ extract_image_partition() { local offset=$(partoffset "$image" "$partnum") local size=$(partsize "$image" "$partnum") dd if=$image of=$output_file bs=512 skip=$offset count=$size \ - conv=notrunc 2>/dev/null + conv=notrunc,sparse 2>/dev/null } # Replace a partition in an image from file |