• Qu Wenruo's avatar
    btrfs: extent-tree: Add new version of btrfs_check_data_free_space and... · 4ceff079
    Qu Wenruo authored
    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: default avatarQu Wenruo <quwenruo@cn.fujitsu.com>
    Signed-off-by: default avatarChris Mason <clm@fb.com>
    4ceff079
ctree.h 140 KB