]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: extent-tree: Add new version of btrfs_check_data_free_space and btrfs_free_res...
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Tue, 8 Sep 2015 09:22:42 +0000 (17:22 +0800)
committerChris Mason <clm@fb.com>
Thu, 22 Oct 2015 01:41:03 +0000 (18:41 -0700)
commit18bdf56330e2ab8f0ad2ec2e48e63a82ec7f4afa
treed894475934305dbbed66bc7f3f9a119c026db944
parent2585d6a0fe08097b7ea73736ae8da01a1cdb5ccb
btrfs: extent-tree: Add new version of btrfs_check_data_free_space and btrfs_free_reserved_data_space.

Add new functions __btrfs_check_data_free_space() and
__btrfs_free_reserved_data_space() to work with new accurate qgroup
reserved space framework.

The new function will replace old btrfs_check_data_free_space() and
btrfs_free_reserved_data_space() respectively, but until all the change
is done, let's just use the new name.

Also, export internal use function btrfs_alloc_data_chunk_ondemand(), as
now qgroup reserve requires precious bytes, some operation can't get the
accurate number in advance(like fallocate).
But data space info check and data chunk allocate doesn't need to be
that accurate, and can be called at the beginning.

So export it for later operations.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c