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/free-space-cache.c | |
parent | 4a3d1caf8a2c16c55424a0768eade54ee0922341 (diff) | |
download | linux-28ed1345a50491d78e1454ad4005dc5d3557a69e.tar.gz linux-28ed1345a50491d78e1454ad4005dc5d3557a69e.tar.bz2 linux-28ed1345a50491d78e1454ad4005dc5d3557a69e.zip |
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/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 764528a4f6fd..c51482031edf 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -235,6 +235,8 @@ int btrfs_truncate_free_space_cache(struct btrfs_root *root, /* * We don't need an orphan item because truncating the free space cache * will never be split across transactions. + * We don't need to check for -EAGAIN because we're a free space + * cache inode */ ret = btrfs_truncate_inode_items(trans, root, inode, 0, BTRFS_EXTENT_DATA_KEY); |