]> Gentwo Git Trees - linux/.git/commit
btrfs: use booleans for delalloc arguments and struct find_free_extent_ctl
authorFilipe Manana <fdmanana@suse.com>
Mon, 17 Nov 2025 12:02:29 +0000 (12:02 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 21:42:26 +0000 (22:42 +0100)
commite21756fc4aa78539b9cb9b45bfc8c4fd12322bc5
tree0f7d2b24d85ccc239100af4550ed705c7b685fbb
parentd7fe41044b3ac8f9b5965de499a13ac9ae947e79
btrfs: use booleans for delalloc arguments and struct find_free_extent_ctl

The struct find_free_extent_ctl uses an int for the 'delalloc' field but
it's always used as a boolean, and its value is used to be passed to
several functions to signal if we are dealing with delalloc. The same goes
for the 'is_data' argument from btrfs_reserve_extent(). So change the type
from int to bool and move the field definition in the find_free_extent_ctl
structure so that it's close to other bool fields and reduces the size of
the structure from 144 down to 136 bytes (at the moment it's only declared
in the stack of btrfs_reserve_extent(), never allocated otherwise).

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c
fs/btrfs/block-group.h
fs/btrfs/direct-io.c
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.h
fs/btrfs/inode.c