summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2017-12-06 19:37:10 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-18 18:00:25 +0000
commitde2f2fc9e8e6d874a11e69adc2f438975a5c1359 (patch)
tree3d961006af0fcd84a564db6483b3b3414682cff5
parentcda3a78e2a17442f3a2e840713fb5dde502ed53c (diff)
downloadopenembedded-core-contrib-de2f2fc9e8e6d874a11e69adc2f438975a5c1359.tar.gz
openembedded-core-contrib-de2f2fc9e8e6d874a11e69adc2f438975a5c1359.tar.bz2
openembedded-core-contrib-de2f2fc9e8e6d874a11e69adc2f438975a5c1359.zip
image_types: btrfs use sparse file creation
This will speed up file creation and still allow the btrfs tools to create a full btrfs image. This is similar to what we do for ext234 FS types. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/classes/image_types.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index d09d1277ea..e881d0cc2d 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -104,7 +104,7 @@ IMAGE_CMD_btrfs () {
size=${MIN_BTRFS_SIZE}
bbwarn "Rootfs size is too small for BTRFS. Filesystem will be extended to ${size}K"
fi
- dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs count=${size} bs=1024
+ dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs seek=${size} count=0 bs=1024
mkfs.btrfs ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs
}