[oe-commits] [openembedded-core] 36/41: image_types: btrfs use sparse file creation

git at git.openembedded.org git at git.openembedded.org
Mon Dec 18 18:05:13 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit de2f2fc9e8e6d874a11e69adc2f438975a5c1359
Author: Saul Wold <sgw at linux.intel.com>
AuthorDate: Wed Dec 6 19:37:10 2017 -0800

    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 at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/image_types.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index d09d127..e881d0c 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
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list