Commit c5f1e5ad authored by Kent Overstreet's avatar Kent Overstreet Committed by Jens Axboe

bcache: Add a cond_resched() call to gc

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Tested-by: default avatarEric Wheeler <bcache@linux.ewheeler.net>
Cc: Kent Overstreet <kmo@daterainc.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 2ef9ccbf
......@@ -1741,6 +1741,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