From: Ross Burton Date: Tue, 12 Apr 2016 14:51:50 +0000 (+0100) Subject: Revert "wic/utils/partitionedfs.py: assemble .wic images as sparse files" X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~26187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63d15764cc2014dba9fee2186f0c8b97c2ac5682;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git Revert "wic/utils/partitionedfs.py: assemble .wic images as sparse files" It turns out that dd's conv=sparse doesn't look at the file extents, but simply checks if a "block" is all zero. If the block of zero was meaningful it gets lost and if the image is subsequently written to media using a sparse-aware writer then the block of zeros won't be written at all. This reverts commit 5fd592fbae2e046bcb8c3a6c3ef4993fe0400676. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index 3e2b420875f..5a103bbc7e8 100644 --- a/scripts/lib/wic/utils/partitionedfs.py +++ b/scripts/lib/wic/utils/partitionedfs.py @@ -340,7 +340,7 @@ class Image(object): source = part['source_file'] if source: # install source_file contents into a partition - cmd = "dd if=%s of=%s bs=%d seek=%d count=%d conv=notrunc,sparse" % \ + cmd = "dd if=%s of=%s bs=%d seek=%d count=%d conv=notrunc" % \ (source, image_file, self.sector_size, part['start'], part['size']) exec_cmd(cmd)