diff options
author | Chris Mason <clm@fb.com> | 2014-12-17 09:41:04 -0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-04-10 14:00:14 -0700 |
commit | 28ed1345a50491d78e1454ad4005dc5d3557a69e (patch) | |
tree | bd620b07d9b964680dca517d7dd052f294c13a2c /fs/btrfs/transaction.c | |
parent | 4a3d1caf8a2c16c55424a0768eade54ee0922341 (diff) | |
download | op-kernel-dev-28ed1345a50491d78e1454ad4005dc5d3557a69e.zip op-kernel-dev-28ed1345a50491d78e1454ad4005dc5d3557a69e.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 91c303a..ba831ee 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; } |