diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-05-13 17:55:09 +0400 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-05-18 05:40:22 +0400 |
commit | 7b61cd92242542944fc27024900c495a6a7b3396 (patch) | |
tree | c2a5556859fd55642a6bc1728f62c1da11926c3b /fs/btrfs/free-space-cache.h | |
parent | 7cfa9e51d2948ae90e7599cc114dcce2c7c2b1fc (diff) | |
download | linux-7b61cd92242542944fc27024900c495a6a7b3396.tar.xz |
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>
Diffstat (limited to 'fs/btrfs/free-space-cache.h')
-rw-r--r-- | fs/btrfs/free-space-cache.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h index 4dc17d8809c7..8b7f19f44961 100644 --- a/fs/btrfs/free-space-cache.h +++ b/fs/btrfs/free-space-cache.h @@ -54,6 +54,8 @@ int create_free_space_inode(struct btrfs_root *root, struct btrfs_block_group_cache *block_group, struct btrfs_path *path); +int btrfs_check_trunc_cache_free_space(struct btrfs_root *root, + struct btrfs_block_rsv *rsv); int btrfs_truncate_free_space_cache(struct btrfs_root *root, struct btrfs_trans_handle *trans, struct btrfs_path *path, |