• Josef Bacik's avatar
    Btrfs: do transaction space reservation before joining the transaction · b5009945
    Josef Bacik authored
    We have to do weird things when handling enospc in the transaction joining code.
    Because we've already joined the transaction we cannot commit the transaction
    within the reservation code since it will deadlock, so we have to return EAGAIN
    and then make sure we don't retry too many times.  Instead of doing this, just
    do the reservation the normal way before we join the transaction, that way we
    can do whatever we want to try and reclaim space, and then if it fails we know
    for sure we are out of space and we can return ENOSPC.  Thanks,
    Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
    b5009945
ctree.h 85.9 KB