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 2:58 PM Marek Behun <marek.behun@xxxxxx> wrote:
>
> On Wed, 22 Apr 2020 14:44:46 -0600
> Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote:
>
> > e.g. from a 10m file created with truncate on two Btrfs file systems
> >
> > original holes format (default)
> >
> >     item 6 key (257 EXTENT_DATA 0) itemoff 15768 itemsize 53
> >         generation 7412 type 1 (regular)
> >         extent data disk byte 0 nr 0
> >         extent data offset 0 nr 10485760 ram 10485760
> >         extent compression 0 (none)
> >
> > On a file system with no-holes feature set, this item simply doesn't
> > exist. I think basically it works by inference. Both kinds of files
> > have size in the INODE_ITEM, e.g.
> >
> >     item 4 key (257 INODE_ITEM 0) itemoff 32245 itemsize 160
> >         generation 889509 transid 889509 size 10485760 nbytes 0
> >
> > Sparse extents are explicitly stated in the original format with disk
> > byte 0 in an EXTENT_DATA item; whereas in the newer format, sparse
> > extents exist whenever EXTENT_DATA items don't completely describe the
> > file's size.
>
> Ok this means that U-Boot currently gained support for the original
> sparse extents.
>
> I fear that current u-boot does not handle the new no-holes feature.

I'd advise it should support it, I think it's expected to become the
default. But I don't know the time frame for that.

Also, when the no-holes feature flag is not set, you can be certain
only the original hole type is used. But when no-holes feature is set,
it's possible for both types of holes to exist, because no-holes can
be set after mkfs time by btrfstune.

-- 
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