提交 c5f1e5ad 编写于 作者: K Kent Overstreet 提交者: Jens Axboe

bcache: Add a cond_resched() call to gc

Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Tested-by: NEric Wheeler <bcache@linux.ewheeler.net>
Cc: Kent Overstreet <kmo@daterainc.com>
Cc: stable@vger.kernel.org
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 2ef9ccbf
...@@ -1741,6 +1741,7 @@ static void bch_btree_gc(struct cache_set *c) ...@@ -1741,6 +1741,7 @@ static void bch_btree_gc(struct cache_set *c)
do { do {
ret = btree_root(gc_root, c, &op, &writes, &stats); ret = btree_root(gc_root, c, &op, &writes, &stats);
closure_sync(&writes); closure_sync(&writes);
cond_resched();
if (ret && ret != -EAGAIN) if (ret && ret != -EAGAIN)
pr_warn("gc failed!"); pr_warn("gc failed!");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册