diff options
author | Josef Bacik <jbacik@fusionio.com> | 2012-06-26 16:13:18 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-07-23 16:27:55 -0400 |
commit | 0e721106923be82f651dd0ee504742a8a3eb089f (patch) | |
tree | 03503ad628e903b381cd0a1874eaeb796359634c /fs/btrfs/transaction.h | |
parent | b9959295151625c17723103afd79077e80b24ddd (diff) |
Btrfs: change how we indicate we're adding csums
There is weird logic I had to put in place to make sure that when we were
adding csums that we'd used the delalloc block rsv instead of the global
block rsv. Part of this meant that we had to free up our transaction
reservation before we ran the delayed refs since csum deletion happens
during the delayed ref work. The problem with this is that when we release
a reservation we will add it to the global reserve if it is not full in
order to keep us going along longer before we have to force a transaction
commit. By releasing our reservation before we run delayed refs we don't
get the opportunity to drain down the global reserve for the work we did, so
we won't refill it as often. This isn't a problem per-se, it just results
in us possibly committing transactions more and more often, and in rare
cases could cause those WARN_ON()'s to pop in use_block_rsv because we ran
out of space in our block rsv.
This also helps us by holding onto space while the delayed refs run so we
don't end up with as many people trying to do things at the same time, which
again will help us not force commits or hit the use_block_rsv warnings.
Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.h')
-rw-r--r-- | fs/btrfs/transaction.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index fe27379e368b..d314a74b4968 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h | |||
@@ -57,6 +57,7 @@ struct btrfs_trans_handle { | |||
57 | struct btrfs_block_rsv *block_rsv; | 57 | struct btrfs_block_rsv *block_rsv; |
58 | struct btrfs_block_rsv *orig_rsv; | 58 | struct btrfs_block_rsv *orig_rsv; |
59 | int aborted; | 59 | int aborted; |
60 | int adding_csums; | ||
60 | }; | 61 | }; |
61 | 62 | ||
62 | struct btrfs_pending_snapshot { | 63 | struct btrfs_pending_snapshot { |