Commit 710d5921 authored by David Sterba's avatar David Sterba

btrfs: switch btrfs_block_rsv::failfast to bool

Use simple bool type for the block reserve failfast status, there's
short to save space as there used to be int but there's no reason for
that.
Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent c70c2c5b
......@@ -26,8 +26,8 @@ struct btrfs_block_rsv {
struct btrfs_space_info *space_info;
spinlock_t lock;
bool full;
bool failfast;
unsigned short type;
unsigned short failfast;
/*
* Qgroup equivalent for @size @reserved
......
......@@ -2736,7 +2736,7 @@ int btrfs_replace_file_extents(struct btrfs_inode *inode,
goto out;
}
rsv->size = btrfs_calc_insert_metadata_size(fs_info, 1);
rsv->failfast = 1;
rsv->failfast = true;
/*
* 1 - update the inode
......
......@@ -5432,7 +5432,7 @@ void btrfs_evict_inode(struct inode *inode)
if (!rsv)
goto no_delete;
rsv->size = btrfs_calc_metadata_size(fs_info, 1);
rsv->failfast = 1;
rsv->failfast = true;
btrfs_i_size_write(BTRFS_I(inode), 0);
......@@ -8686,7 +8686,7 @@ static int btrfs_truncate(struct inode *inode, bool skip_writeback)
if (!rsv)
return -ENOMEM;
rsv->size = min_size;
rsv->failfast = 1;
rsv->failfast = true;
/*
* 1 for the truncate slack space
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment