• Josef Bacik's avatar
    Btrfs: do not needlessly restart the transaction for enospc · ca7e70f5
    Josef Bacik authored
    We will stop and restart a transaction every time we move to a different leaf
    when truncating a file.  This is for enospc reasons, but really we could
    probably get away with doing this a little better by actually working until we
    hit an ENOSPC.  So add a ->failfast flag to the block_rsv and set it when we do
    truncates which will fail as soon as the block rsv runs out of space, and then
    at that point we can stop and restart the transaction and refill the block rsv
    and carry on.  This will make rm'ing of a file with lots of extents a bit
    faster.  Thanks,
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    ca7e70f5
extent-tree.c 215 KB