]> code.ossystems Code Review - openembedded-core.git/commit
image_types: Restore pre-btrfs-tools 4.14.1 mkfs.btrfs shrink behavior
authorMarek Vasut <marex@denx.de>
Tue, 27 Jul 2021 16:25:04 +0000 (18:25 +0200)
committerAnuj Mittal <anuj.mittal@intel.com>
Thu, 26 Aug 2021 09:09:16 +0000 (17:09 +0800)
commit6a72c7c688c7985d19f0387121b3a77639ba6f60
treed68a7fed1932cb2ba2517eb511067bd7cb3847f6
parent04caef3d9c0318c9169883650615af37aab30678
image_types: Restore pre-btrfs-tools 4.14.1 mkfs.btrfs shrink behavior

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