[Buildroot] [PATCH v6 1/5] package/bmap-tools: new package

Thomas Petazzoni thomas.petazzoni at bootlin.com
Fri Jun 25 12:45:09 UTC 2021


On Fri, 25 Jun 2021 14:35:14 +0200
"Yann E. MORIN" <yann.morin.1998 at free.fr> wrote:

> I am not too sure what bmap provides over 'dd conv=sparse'...
> 
> dd has a blocking size, which can be adjusted to the underlying device,
> and does not need the input file to actually be sparse (i.e. any
> block-aligned runs of zeroes will not be transfered)...
> 
> Also, we have seen in the past that not writing zero-blocks on the
> destination device, can lead to filesystem corruption, because all-zero
> filesystem metadata suddenly may no longer be all-zero...

Well, this is precisely avoided by bmaptools I believe. bmaptools is
not about skipping zeroes, it's about skipping holes in sparse files.
So if a filesystem utility has explicitly written a huge amount of
zeroes, it's not a hole in the file, and therefore they will be written
as expected by bmaptools.

And with that, there are no risk: block filesystems do not make
assumptions about the state of the data they have not explicitly
written/initialized at the time of mkfs.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list