summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-08-30 10:19:10 -0400
committerJosef Bacik <josef@redhat.com>2011-10-19 15:12:42 -0400
commitc09544e07f8cdc455ed8615d4c067d694c33bd18 (patch)
treec9943e56457ac64e2223396841e043e4514462e0 /fs/btrfs/inode.c
parent300e4f8a56f263797568c95b71c949f9f02e4534 (diff)
downloadop-kernel-dev-c09544e07f8cdc455ed8615d4c067d694c33bd18.zip
op-kernel-dev-c09544e07f8cdc455ed8615d4c067d694c33bd18.tar.gz
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>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 06ae5b1..78b5ae5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -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);
}
OpenPOWER on IntegriCloud