Commit b7ce521d authored by Kent Overstreet's avatar Kent Overstreet Committed by Greg Kroah-Hartman

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 avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1d348932
......@@ -1641,6 +1641,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