Commit c79d1991 authored by Kent Overstreet's avatar Kent Overstreet Committed by Luis Henriques

bcache: Add a cond_resched() call to gc

commit c5f1e5ad upstream.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Tested-by: default avatarEric Wheeler <bcache@linux.ewheeler.net>
Cc: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent dbec969a
......@@ -1729,6 +1729,7 @@ static void bch_btree_gc(struct cache_set *c)
do {
ret = btree_root(gc_root, c, &op, &writes, &stats);
closure_sync(&writes);
cond_resched();
if (ret && ret != -EAGAIN)
pr_warn("gc failed!");
......
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