From: Filipe Manana Date: Mon, 20 Apr 2026 10:44:07 +0000 (+0100) Subject: btrfs: use the enums instead of int type in struct btrfs_block_group fields X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=a6df0dcc23ac8be8dfb233ea7367071c1f2c9cf4;p=thirdparty%2Flinux.git btrfs: use the enums instead of int type in struct btrfs_block_group fields The 'disk_cache_state' and 'cached' fields are defined with an int type but all the values we assigned to them come from the enums btrfs_disk_cache_state and btrfs_caching_type. So change the type in the btrfs_block_group structure from int to these enums - in practice an enum is an int, so this is more for readability and clarity. Reviewed-by: Qu Wenruo Reviewed-by: Sun YangKai Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/block-group.h b/fs/btrfs/block-group.h index 60a3b1c0a8abd..790c2d467af57 100644 --- a/fs/btrfs/block-group.h +++ b/fs/btrfs/block-group.h @@ -171,10 +171,10 @@ struct btrfs_block_group { unsigned long full_stripe_len; unsigned long runtime_flags; - int disk_cache_state; + enum btrfs_disk_cache_state disk_cache_state; /* Cache tracking stuff */ - int cached; + enum btrfs_caching_type cached; struct btrfs_caching_control *caching_ctl; struct btrfs_space_info *space_info;