Btrfs: handle enospc accounting for free space inodes
Since free space inodes now use normal checksumming we need to make sure to account for their metadata use. So reserve metadata space, and then if we fail to write out the metadata we can just release it, otherwise it will be freed up when the io completes. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
This commit is contained in:
@@ -1792,11 +1792,11 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end)
|
||||
}
|
||||
ret = 0;
|
||||
out:
|
||||
btrfs_delalloc_release_metadata(inode, ordered_extent->len);
|
||||
if (nolock) {
|
||||
if (trans)
|
||||
btrfs_end_transaction_nolock(trans, root);
|
||||
} else {
|
||||
btrfs_delalloc_release_metadata(inode, ordered_extent->len);
|
||||
if (trans)
|
||||
btrfs_end_transaction(trans, root);
|
||||
}
|
||||
|
Reference in New Issue
Block a user