• Josef Bacik's avatar
    Btrfs: account for space we may use in fallocate · a970b0a1
    Josef Bacik authored
    Using Eric Sandeen's xfstest for fallocate, you can easily trigger a ENOSPC
    panic on btrfs.  This is because we do not account for data we may use when
    doing the fallocate.  This patch fixes the problem by properly reserving space,
    and then just freeing it when we are done.  The reservation stuff was made with
    delalloc in mind, so its a little crude for this case, but it keeps the box
    from panicing.
    Signed-off-by: default avatarJosef Bacik <jbacik@redhat.com>
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    a970b0a1
inode.c 143 KB