mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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> |
||
|---|---|---|
| .. | ||
| btrfs-tests.c | ||
| btrfs-tests.h | ||
| chunk-allocation-tests.c | ||
| delayed-refs-tests.c | ||
| extent-buffer-tests.c | ||
| extent-io-tests.c | ||
| extent-map-tests.c | ||
| free-space-tests.c | ||
| free-space-tree-tests.c | ||
| inode-tests.c | ||
| qgroup-tests.c | ||
| raid-stripe-tree-tests.c | ||
| zoned-tests.c | ||