summaryrefslogtreecommitdiff
path: root/drivers/md/bcache
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2015-11-30 01:18:33 (GMT)
committerJens Axboe <axboe@fb.com>2015-12-31 03:23:06 (GMT)
commitc5f1e5adf956e3ba82d204c7c141a75da9fa449a (patch)
treeb8f09c4d77adb48ffef67ab304d5f47970a7a65d /drivers/md/bcache
parent2ef9ccbfcb90cf84bdba320a571b18b05c41101b (diff)
downloadlinux-c5f1e5adf956e3ba82d204c7c141a75da9fa449a.tar.xz
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>
Diffstat (limited to 'drivers/md/bcache')
-rw-r--r--drivers/md/bcache/btree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 4a1179c..22b9e34 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!");