1
0

Btrfs: don't use global block reservation for inode cache truncation

It is very likely that there are lots of subvolumes/snapshots in the filesystem,
so if we use global block reservation to do inode cache truncation, we may hog
all the free space that is reserved in global rsv. So it is better that we do
the free space reservation for inode cache truncation by ourselves.

Cc: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Este cometimento está contido em:
Miao Xie
2013-05-13 13:55:09 +00:00
cometido por Josef Bacik
ascendente 7cfa9e51d2
cometimento 7b61cd9224
5 ficheiros modificados com 34 adições e 22 eliminações

Ver ficheiro

@@ -3106,6 +3106,11 @@ again:
WARN_ON(ret);
if (i_size_read(inode) > 0) {
ret = btrfs_check_trunc_cache_free_space(root,
&root->fs_info->global_block_rsv);
if (ret)
goto out_put;
ret = btrfs_truncate_free_space_cache(root, trans, path,
inode);
if (ret)