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:
parent
2ef9ccbfcb
commit
c5f1e5adf9
|
@ -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!");
|
||||
|
|
Loading…
Reference in New Issue