Commit 4dd466d3 authored by Miao Xie's avatar Miao Xie Committed by Chris Mason

Btrfs: don't run delayed nodes again after all nodes flush

If the number of the delayed items is greater than the upper limit, we will
try to flush all the delayed items. After that, it is unnecessary to run
them again because they are being dealt with by the wokers or the number of
them is less than the lower limit.
Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 74c40f92
...@@ -1395,6 +1395,7 @@ void btrfs_balance_delayed_items(struct btrfs_root *root) ...@@ -1395,6 +1395,7 @@ void btrfs_balance_delayed_items(struct btrfs_root *root)
break; break;
} }
finish_wait(&delayed_root->wait, &__wait); finish_wait(&delayed_root->wait, &__wait);
return;
} }
btrfs_wq_run_delayed_node(delayed_root, root, BTRFS_DELAYED_BATCH); btrfs_wq_run_delayed_node(delayed_root, root, BTRFS_DELAYED_BATCH);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment