[gnome-continuous-yocto/gnomeostree-3.28-rocko: 54/218] image_types: btrfs use sparse file creation



commit 292214ea74ea8d70012f830b049c1ee7e1e29771
Author: Saul Wold <sgw linux intel com>
Date:   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.
    
    (From OE-Core rev: 8eb20c43232ae87c65d27810e5250676bb1d9675)
    
    Signed-off-by: Saul Wold <sgw linux intel com>
    Signed-off-by: Ross Burton <ross burton intel com>
    (cherry picked from commit de2f2fc9e8e6d874a11e69adc2f438975a5c1359)
    Signed-off-by: Armin Kuster <akuster808 gmail com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 meta/classes/image_types.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
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
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]