summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-08-30 11:31:29 -0400
committerJosef Bacik <josef@redhat.com>2011-10-19 15:12:42 -0400
commit4c13d758b7e79c14a0026c1f783f0c79e339b7bb (patch)
treed1510daf164457d433b5f6219e5d48f2f6720a31 /fs/btrfs/transaction.c
parentc09544e07f8cdc455ed8615d4c067d694c33bd18 (diff)
downloadtalos-op-linux-4c13d758b7e79c14a0026c1f783f0c79e339b7bb.tar.gz
talos-op-linux-4c13d758b7e79c14a0026c1f783f0c79e339b7bb.zip
Btrfs: use the transactions block_rsv for the csum root
The alloc warnings everybody has been seeing is because we have been reserving space for csums, but we weren't actually using that space. So make get_block_rsv() return the trans->block_rsv if we're modifying the csum root. Also set the trans->block_rsv to NULL so that if we modify the csum root when running delayed ref's that comes out of the global reserve like it's supposed to. With this patch I'm not seeing those alloc warnings anymore. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index a1d8c322c1ba..a770f4bd9d31 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -453,6 +453,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
return 0;
}
+ trans->block_rsv = NULL;
while (count < 4) {
unsigned long cur = trans->delayed_ref_updates;
trans->delayed_ref_updates = 0;
OpenPOWER on IntegriCloud