]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use enum for btrfs_block_rsv::type
authorDavid Sterba <dsterba@suse.com>
Thu, 23 Jun 2022 15:15:37 +0000 (17:15 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:45:40 +0000 (17:45 +0200)
commit73a76313f357be28a068facbbc577197a9457b4d
tree99014c525899b7f30bf86a691ffe6fa370cbf93b
parent4fdf2e60dacdce11bce56b8bb138a8e16cf4a697
btrfs: use enum for btrfs_block_rsv::type

The number of block group reserve types BTRFS_BLOCK_RSV_* is small and
fits to u8 and there's enough left in case we want to add more.
For type safety use the enum but make it 8 bits in the structure to save
space.

The structure size is now 48 on release build, making a slight
improvement in structures where it's embedded, like btrfs_fs_info or
btrfs_inode.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-rsv.c
fs/btrfs/block-rsv.h