aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-10-14 13:37:45 -0400
committerJosef Bacik <josef@redhat.com>2011-10-19 15:12:56 -0400
commitbbb495c2ed9d34894cb3d6d366866fc92a2e1adc (patch)
tree862620d1c80d3b46758c04c9f6a0b8b9be202140 /fs
parented3ee9f44ba55eb6acfbfc8caa881e0253710d2a (diff)
Btrfs: don't check bytes_pinned to determine if we should commit the transaction
Before the only reason to commit the transaction to recover space in reserve_metadata_bytes() was if there were enough pinned_bytes to satisfy our reservation. But now we have the delayed inode stuff which will hold it's reservations until we commit the transaction. So say we max out our reservation by creating a bunch of files but don't have any pinned bytes we will ENOSPC out early even though we could commit the transaction and get that space back. So now just unconditionally commit the transaction since currently there is no way to know how much metadata space is being reserved by delayed inode stuff. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent-tree.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index fc0de6880045..79365a40cb3a 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3568,17 +3568,6 @@ again:
3568 goto again; 3568 goto again;
3569 } 3569 }
3570 3570
3571 /*
3572 * Not enough space to be reclaimed, don't bother committing the
3573 * transaction.
3574 */
3575 spin_lock(&space_info->lock);
3576 if (space_info->bytes_pinned < orig_bytes)
3577 ret = -ENOSPC;
3578 spin_unlock(&space_info->lock);
3579 if (ret)
3580 goto out;
3581
3582 ret = -EAGAIN; 3571 ret = -EAGAIN;
3583 if (trans) 3572 if (trans)
3584 goto out; 3573 goto out;