]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
btrfs: qgroup: Introduce functions to release/free qgroup reserve data
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Mon, 12 Oct 2015 08:28:06 +0000 (16:28 +0800)
committerChris Mason <clm@fb.com>
Thu, 22 Oct 2015 01:37:46 +0000 (18:37 -0700)
commitf695fdcef83ac6972e0eda1d6588a56348f521a2
tree1116ac2cb55448e8ababe86ce1535c2d376723b4
parent524725537023bb25a371722b1329446e5a2adcdb
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>
fs/btrfs/qgroup.c
fs/btrfs/qgroup.h