From: "Anuj Mittal" <anuj.mittal@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [hardknott][PATCH 6/9] image_types: Restore pre-btrfs-tools 4.14.1 mkfs.btrfs shrink behavior
Date: Mon, 30 Aug 2021 15:33:57 +0800 [thread overview]
Message-ID: <6a72c7c688c7985d19f0387121b3a77639ba6f60.1630306698.git.anuj.mittal@intel.com> (raw)
In-Reply-To: <cover.1630306698.git.anuj.mittal@intel.com>
From: Marek Vasut <marex@denx.de>
Currently the mkfs.btrfs generates large images with a lot of wasted
space. This happens since OE-core updated btrfs-tools from 4.13.3 to
4.15.1 in commit 94b645aa77 ("btrfs-tools: update to 4.15.1") .
Note in mkfs.btrfs(8) manpage section -r says the following:
"
-r|--rootdir <rootdir>
...
Note This option may enlarge the image or file to ensure
it’s big enough to contain the files from rootdir. Since
version 4.14.1 the filesystem size is not minimized. Please
see option --shrink if you need that functionality.
--shrink
Shrink the filesystem to its minimal size, only works with
--rootdir option.
...
Note prior to version 4.14.1, the shrinking was done
automatically.
"
Add the --shrink option to EXTRA_IMAGECMD_btrfs to reinstate the
original behavior and un-waste the space.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c4a99d36967302c176b62fad840b5e79486ea356)
Signed-off-by: Anuj Mittal <anuj.mittal@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 8028691405..cee577d5da 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -225,7 +225,7 @@ EXTRA_IMAGECMD_jffs2 ?= "--pad ${JFFS2_ENDIANNESS} --eraseblock=${JFFS2_ERASEBLO
EXTRA_IMAGECMD_ext2 ?= "-i 4096"
EXTRA_IMAGECMD_ext3 ?= "-i 4096"
EXTRA_IMAGECMD_ext4 ?= "-i 4096"
-EXTRA_IMAGECMD_btrfs ?= "-n 4096"
+EXTRA_IMAGECMD_btrfs ?= "-n 4096 --shrink"
EXTRA_IMAGECMD_f2fs ?= ""
do_image_cpio[depends] += "cpio-native:do_populate_sysroot"
--
2.31.1
next prev parent reply other threads:[~2021-08-30 7:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-30 7:33 [hardknott][PATCH 0/9] Patch review request Anuj Mittal
2021-08-30 7:33 ` [hardknott][PATCH 1/9] icu: increase pkgdata command buffer size Anuj Mittal
2021-08-30 7:33 ` [hardknott][PATCH 2/9] openssl: upgrade from 1.1.1k to 1.1.1l Anuj Mittal
2021-08-30 7:33 ` [hardknott][PATCH 3/9] file: fix close_on_exec for multithreaded decompression Anuj Mittal
2021-08-30 7:33 ` [hardknott][PATCH 4/9] weston: Re-order gbm destruction at DRM-backend tear down Anuj Mittal
2021-08-30 7:33 ` [hardknott][PATCH 5/9] tcf-agent: fetching over git:// no longer works Anuj Mittal
2021-08-30 7:33 ` Anuj Mittal [this message]
2021-08-30 7:33 ` [hardknott][PATCH 7/9] linux-firmware: upgrade 20210511 -> 20210818 Anuj Mittal
2021-08-30 7:33 ` [hardknott][PATCH 8/9] linux-yocto/5.4: update to v5.4.141 Anuj Mittal
2021-08-30 7:34 ` [hardknott][PATCH 9/9] linux-yocto/5.4: update to v5.4.142 Anuj Mittal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a72c7c688c7985d19f0387121b3a77639ba6f60.1630306698.git.anuj.mittal@intel.com \
--to=anuj.mittal@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.