Re: when does btrfs create sparse extents?

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

 



On Thu, Apr 23, 2020 at 1:06 PM Marek Behun <marek.behun@xxxxxx> wrote:
>
> On Thu, 23 Apr 2020 12:51:32 +0100
> Filipe Manana <fdmanana@xxxxxxxxx> wrote:
>
> > There's nothing in btrfs that converts a sequence of zeroes
> > automatically to a hole.
> >
> > It always has to be done by user space, either by writes that leave
> > holes intentionally (e.g. create file, write 64K to offset 0, write 4K
> > to offset 128, leaves a hole from range 64K to 128K) or by hole
> > punching through fallocate().
>
> Thanks for this information. If you ever come to Prague, let me know,
> we can have a beer :D

Noted! (Through it will be a long while until travel is allowed and safe)

Another case I forgot is a hole created by truncation - truncate a
file to a larger size, then you get a hole for the range that goes
from the old file size to the new file size.



-- 
Filipe David Manana,

“Whether you think you can, or you think you can't — you're right.”




[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