btrfs: switch BTRFS_BLOCK_RSV_* to enums

We can use simple enum for values that are not part of on-disk format:
block reserve types.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2018-11-27 14:53:06 +01:00
parent b00146b5d5
commit 688a75b9a3

View File

@@ -461,13 +461,18 @@ struct btrfs_space_info {
struct kobject *block_group_kobjs[BTRFS_NR_RAID_TYPES]; struct kobject *block_group_kobjs[BTRFS_NR_RAID_TYPES];
}; };
#define BTRFS_BLOCK_RSV_GLOBAL 1 /*
#define BTRFS_BLOCK_RSV_DELALLOC 2 * Types of block reserves
#define BTRFS_BLOCK_RSV_TRANS 3 */
#define BTRFS_BLOCK_RSV_CHUNK 4 enum {
#define BTRFS_BLOCK_RSV_DELOPS 5 BTRFS_BLOCK_RSV_GLOBAL,
#define BTRFS_BLOCK_RSV_EMPTY 6 BTRFS_BLOCK_RSV_DELALLOC,
#define BTRFS_BLOCK_RSV_TEMP 7 BTRFS_BLOCK_RSV_TRANS,
BTRFS_BLOCK_RSV_CHUNK,
BTRFS_BLOCK_RSV_DELOPS,
BTRFS_BLOCK_RSV_EMPTY,
BTRFS_BLOCK_RSV_TEMP,
};
struct btrfs_block_rsv { struct btrfs_block_rsv {
u64 size; u64 size;