mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
btrfs: don't throttle on delayed items when evicting deleted inode
During inode eviction, if we are truncating a deleted inode, we don't add delayed items for our inode, so there's no need to throttle on delayed items on each iteration of the loop that truncates inode items from its subvolume tree. But we dirty extent buffers from its subvolume tree, so we only need to throttle on btree inode dirty pages. So use btrfs_btree_balance_dirty_nodelay() in the loop that truncates inode items. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
a8fdc05172
commit
afa4b0afee
@ -5350,7 +5350,12 @@ void btrfs_evict_inode(struct inode *inode)
|
||||
ret = btrfs_truncate_inode_items(trans, root, &control);
|
||||
trans->block_rsv = &fs_info->trans_block_rsv;
|
||||
btrfs_end_transaction(trans);
|
||||
btrfs_btree_balance_dirty(fs_info);
|
||||
/*
|
||||
* We have not added new delayed items for our inode after we
|
||||
* have flushed its delayed items, so no need to throttle on
|
||||
* delayed items. However we have modified extent buffers.
|
||||
*/
|
||||
btrfs_btree_balance_dirty_nodelay(fs_info);
|
||||
if (ret && ret != -ENOSPC && ret != -EAGAIN)
|
||||
goto free_rsv;
|
||||
else if (!ret)
|
||||
|
Loading…
Reference in New Issue
Block a user