• J
    Btrfs: seperate out btrfs_block_rsv_check out into 2 different functions · 36ba022a
    Josef Bacik 提交于
    Currently btrfs_block_rsv_check does 2 things, it will either refill a block
    reserve like in the truncate or refill case, or it will check to see if there is
    enough space in the global reserve and possibly refill it.  However because of
    overcommit we could be well overcommitting ourselves just to try and refill the
    global reserve, when really we should just be committing the transaction.  So
    breack this out into btrfs_block_rsv_refill and btrfs_block_rsv_check.  Refill
    will try to reserve more metadata if it can and btrfs_block_rsv_check will not,
    it will only tell you if the factor of the total space is still reserved.
    Thanks,
    Signed-off-by: NJosef Bacik <josef@redhat.com>
    36ba022a
transaction.c 36.1 KB