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:

cometido por
Josef Bacik

ascendente
7cfa9e51d2
cometimento
7b61cd9224
@@ -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)
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador