• Yan, Zheng's avatar
    Btrfs: Introduce contexts for metadata reservation · f0486c68
    Yan, Zheng authored
    Introducing metadata reseravtion contexts has two major advantages.
    First, it makes metadata reseravtion more traceable. Second, it can
    reclaim freed space and re-add them to the itself after transaction
    Besides add btrfs_block_rsv structure and related helper functions,
    This patch contains following changes:
    Move code that decides if freed tree block should be pinned into
    Make space accounting more accurate, mainly for handling read only
    block groups.
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
ctree.h 78.6 KB