• Josef Bacik's avatar
    Btrfs: only adjust outstanding_extents when we do a short write · 3e05bde8
    Josef Bacik authored
    We have this weird dance where we always inc outstanding_extents when we do a
    O_DIRECT write, even if we allocate the entire range.  To get around this we
    also drop the metadata space if we successfully write.  This is an unnecessary
    dance, we only need to jack up outstanding_extents if we don't satisfy the
    entire range request in get_blocks_direct, otherwise we are good using our
    original reservation.  So drop the unconditional inc and the drop of the
    metadata space that we have for the unconditional inc.  Thanks,
    Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
    Reviewed-by: default avatarLiu Bo <bo.li.liu@oracle.com>
    Signed-off-by: default avatarChris Mason <clm@fb.com>
    3e05bde8
inode.c 253 KB