Re: [PATCH v2 5/8] btrfs-progs: print encryptin type field of file extents
From: Daniel Vacek
Date: Thu Jul 02 2026 - 03:24:01 EST
On Thu, 2 Jul 2026 at 09:11, Qu Wenruo <quwenruo.btrfs@xxxxxxx> wrote:
> 在 2026/7/2 16:35, Daniel Vacek 写道:
> [...]
> >>
> >> A simple tree dump can always show which range is hole and which is
> >> preallocated.
> >
> > Yeah, that's true. I'm curious how other FSes handle this. Let me see.
> > Or do you know from the top of your head?
>
> Sorry, not familiar with other fscrypt implementation at all.
> You may want to try to experiment on ext4 to see how it's implemented.
>
> I guess they do nothing special and just expose hole/prealloc info.
>
> As the other path would be always filling hole with zero filled regular
> extents (before encryption), and disable preallocation completely.
> That looks over-killed and may take a lot of extra space.
Well, rather filling the prealloc with the same zero-filled extent I guess.
--nX