diff options
author | Kent Overstreet <kmo@daterainc.com> | 2015-11-29 17:18:33 -0800 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-02-01 14:53:40 -0500 |
commit | 08656518aa2812e8650b8036201bd9e5463f22a8 (patch) | |
tree | 5b6543a9dfb402cd3b8d2ee11170c6544a1410a1 /drivers/md | |
parent | c505638900d191ae10d1f8afdc8d09ca8c2de0d4 (diff) |
bcache: Add a cond_resched() call to gc
[ Upstream commit c5f1e5adf956e3ba82d204c7c141a75da9fa449a ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers/md')
-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 9aaa8f86b92a..43829d9493f7 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!"); |