summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2026-04-15 19:34:38 +0100
committerDavid Sterba <dsterba@suse.com>2026-06-08 15:53:29 +0200
commit2a1ed20f0dc2219b68adf9b2781233f1da5c518c (patch)
tree03ffbd6424ffd4ee1dc40fde2a0befc46fed7ebc /include/linux
parent08d9e2162ca2825565e21422f95caa9f5f4b900b (diff)
btrfs: remove op field from struct btrfs_free_space_ctl
The op field always points to the same use_bitmap function, the only exception is during self tests where we make it temporarily point to a different function. So just because of this op pointer field we are increasing the structure size by 8 bytes. Instead of storing a pointer to a use_bitmap function in struct btrfs_free_space_ctl, move the pointer to struct btrfs_info, make insert_into_bitmap() use that pointer if we are running the self tests and initialize that pointer to the current, default use_bitmap function (now exported for the tests as btrfs_use_bitmap). This way we reduce the size of struct btrfs_free_space_ctl from 136 to 128 bytes and can now fit 32 structures in a 4K page instead of 30. This also avoids the cost of the indirection of a function pointer call when we are not running the self tests. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions