summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2015-11-29 17:18:33 -0800
committerJens Axboe <axboe@fb.com>2015-12-30 20:23:06 -0700
commitc5f1e5adf956e3ba82d204c7c141a75da9fa449a (patch)
treeb8f09c4d77adb48ffef67ab304d5f47970a7a65d /drivers/md
parent2ef9ccbfcb90cf84bdba320a571b18b05c41101b (diff)
downloadop-kernel-dev-c5f1e5adf956e3ba82d204c7c141a75da9fa449a.zip
op-kernel-dev-c5f1e5adf956e3ba82d204c7c141a75da9fa449a.tar.gz
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')
-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!");
OpenPOWER on IntegriCloud