diff options
author | Kent Overstreet <kmo@daterainc.com> | 2015-11-30 02:18:33 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-12-31 04:23:06 +0100 |
commit | c5f1e5adf956e3ba82d204c7c141a75da9fa449a (patch) | |
tree | b8f09c4d77adb48ffef67ab304d5f47970a7a65d | |
parent | bcache: fix a livelock when we cause a huge number of cache misses (diff) | |
download | linux-c5f1e5adf956e3ba82d204c7c141a75da9fa449a.tar.xz linux-c5f1e5adf956e3ba82d204c7c141a75da9fa449a.zip |
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>
-rw-r--r-- | drivers/md/bcache/btree.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index 4a1179cbc52e..22b9e34ceb75 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -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!"); |