bcache: Add a cond_resched() call to gc

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Eric Wheeler <bcache@linux.ewheeler.net>
Cc: Kent Overstreet <kmo@daterainc.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Kent Overstreet 2015-11-29 17:18:33 -08:00 committed by Jens Axboe
parent 2ef9ccbfcb
commit c5f1e5adf9

View File

@ -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!");