Skip to content

Commit 73d4bbd

Browse files
fdmananakdave
authored andcommitted
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 <wqu@suse.com> Reviewed-by: Sun YangKai <sunk67188@gmail.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 3854583 commit 73d4bbd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/btrfs/block-group.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ struct btrfs_block_group {
171171
unsigned long full_stripe_len;
172172
unsigned long runtime_flags;
173173

174-
int disk_cache_state;
174+
enum btrfs_disk_cache_state disk_cache_state;
175175

176176
/* Cache tracking stuff */
177-
int cached;
177+
enum btrfs_caching_type cached;
178178
struct btrfs_caching_control *caching_ctl;
179179

180180
struct btrfs_space_info *space_info;

0 commit comments

Comments
 (0)