From: Nicholas Swenson Date: Thu, 23 Jan 2014 23:21:02 +0000 (-0800) Subject: bcache: stop moving_gc marking buckets that can't be moved. X-Git-Tag: firefly_0821_release~176^2~4188^2^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3f6ef38110b6955327fea3105f004a3b61a3f65f;p=firefly-linux-kernel-4.4.55.git bcache: stop moving_gc marking buckets that can't be moved. Signed-off-by: Nicholas Swenson --- diff --git a/drivers/md/bcache/movinggc.c b/drivers/md/bcache/movinggc.c index 5e8e58701d37..cd7490311e51 100644 --- a/drivers/md/bcache/movinggc.c +++ b/drivers/md/bcache/movinggc.c @@ -215,7 +215,10 @@ void bch_moving_gc(struct cache_set *c) ca->heap.used = 0; for_each_bucket(b, ca) { - if (!GC_SECTORS_USED(b)) + if (GC_MARK(b) == GC_MARK_METADATA || + !GC_SECTORS_USED(b) || + GC_SECTORS_USED(b) == ca->sb.bucket_size || + atomic_read(&b->pin)) continue; if (!heap_full(&ca->heap)) {