Hi Martin, all, [ Cc Kent and Bcachefs ML ]
> The default deallocation size is likely too small for bcachefs > to actually release the blocks. Since it is also a copy-on-write > filesystem, deallocated the whole file like on Btrfs. Make sense. Reviewed-by: Petr Vorel <[email protected]> Kind regards, Petr > Signed-off-by: Martin Doucha <[email protected]> > --- > AFAICT Bcachefs uses 512 byte data blocks by default but 256KB inode > blocks. The whole file will be 128KB and 32KB gets deallocated which may > be too small. However, I'm not entirely sure whether this is the best > solution. > See also https://bugzilla.suse.com/show_bug.cgi?id=1230155 > testcases/kernel/syscalls/fallocate/fallocate05.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > diff --git a/testcases/kernel/syscalls/fallocate/fallocate05.c > b/testcases/kernel/syscalls/fallocate/fallocate05.c > index 979c70d6e..732a2f15d 100644 > --- a/testcases/kernel/syscalls/fallocate/fallocate05.c > +++ b/testcases/kernel/syscalls/fallocate/fallocate05.c > @@ -114,7 +114,8 @@ static void run(void) > tst_res(TPASS, "fallocate() on full FS"); > /* Btrfs deallocates only complete extents, not individual blocks */ > - if (!strcmp(tst_device->fs_type, "btrfs")) > + if (!strcmp(tst_device->fs_type, "btrfs") || > + !strcmp(tst_device->fs_type, "bcachefs")) > holesize = bufsize + extsize; > else > holesize = DEALLOCATE_BLOCKS * blocksize;
