summaryrefslogtreecommitdiff
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2014-12-17 20:41:04 +0300
committerChris Mason <clm@fb.com>2015-04-11 00:00:14 +0300
commit28ed1345a50491d78e1454ad4005dc5d3557a69e (patch)
treebd620b07d9b964680dca517d7dd052f294c13a2c /fs/btrfs/transaction.c
parent4a3d1caf8a2c16c55424a0768eade54ee0922341 (diff)
downloadlinux-28ed1345a50491d78e1454ad4005dc5d3557a69e.tar.xz
btrfs: actively run the delayed refs while deleting large files
When we are deleting large files with large extents, we are building up a huge set of delayed refs for processing. Truncate isn't checking often enough to see if we need to back off and process those, or let a commit proceed. The end result is long stalls after the rm, and very long commit times. During the commits, other processes back up waiting to start new transactions and we get into trouble. Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 91c303ac40b6..ba831ee41891 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -718,7 +718,7 @@ int btrfs_should_end_transaction(struct btrfs_trans_handle *trans,
updates = trans->delayed_ref_updates;
trans->delayed_ref_updates = 0;
if (updates) {
- err = btrfs_run_delayed_refs(trans, root, updates);
+ err = btrfs_run_delayed_refs(trans, root, updates * 2);
if (err) /* Error code will also eval true */
return err;
}