Re: when does btrfs create sparse extents?

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

 



On Wed, Apr 22, 2020 at 12:52 PM Marek Behun <marek.behun@xxxxxx> wrote:
>
> Hello,
>
> there was a bug fixed recently in U-Boot's btrfs driver - the driver
> failed to read files with sparse extents. This causes that sometimes
> device failes to boot Linux, since the kernel fails to load from
> storage.
>
> So when does kernel's btrfs driver write sparse extents? Is it always
> when it finds a PAGE_SIZEd and aligned all-zeros block? Or is it more
> complicated?

I'm not a btrfs developer, so with respect to kernel code behavior I
can't answer directly.

But I wonder if other sources of this sparseness has been considered?
Maybe the build system is creating or preserving sparseness? e.g. `tar
--hole-detection` or `--sparse` is used.

Another possibility is Btrfs supports two kinds of holes in the
on-disk format for sparse files. Maybe uboot only supported the
original (current default) type, and the bug really fixed the newer
'no-holes' feature version?


-- 
Chris Murphy



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux