diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2015-10-12 10:28:06 +0200 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-10-22 03:37:46 +0200 |
commit | f695fdcef83ac6972e0eda1d6588a56348f521a2 (patch) | |
tree | 1116ac2cb55448e8ababe86ce1535c2d376723b4 /fs/btrfs/qgroup.h | |
parent | btrfs: qgroup: Introduce btrfs_qgroup_reserve_data function (diff) | |
download | linux-f695fdcef83ac6972e0eda1d6588a56348f521a2.tar.xz linux-f695fdcef83ac6972e0eda1d6588a56348f521a2.zip |
btrfs: qgroup: Introduce functions to release/free qgroup reserve data
space
Introduce functions btrfs_qgroup_release/free_data() to release/free
reserved data range.
Release means, just remove the data range from io_tree, but doesn't
free the reserved space.
This is for normal buffered write case, when data is written into disc
and its metadata is added into tree, its reserved space should still be
kept until commit_trans().
So in that case, we only release dirty range, but keep the reserved
space recorded some other place until commit_tran().
Free means not only remove data range, but also free reserved space.
This is used for case for cleanup and invalidate page.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/qgroup.h')
-rw-r--r-- | fs/btrfs/qgroup.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/qgroup.h b/fs/btrfs/qgroup.h index bd17cc24335c..564eb2147740 100644 --- a/fs/btrfs/qgroup.h +++ b/fs/btrfs/qgroup.h @@ -83,4 +83,6 @@ int btrfs_verify_qgroup_counts(struct btrfs_fs_info *fs_info, u64 qgroupid, /* New io_tree based accurate qgroup reserve API */ int btrfs_qgroup_reserve_data(struct inode *inode, u64 start, u64 len); +int btrfs_qgroup_release_data(struct inode *inode, u64 start, u64 len); +int btrfs_qgroup_free_data(struct inode *inode, u64 start, u64 len); #endif /* __BTRFS_QGROUP__ */ |