diff options
author | Nicholas Swenson <nks@daterainc.com> | 2014-01-23 18:21:02 -0500 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2014-03-18 15:22:34 -0400 |
commit | 3f6ef38110b6955327fea3105f004a3b61a3f65f (patch) | |
tree | d9521b718770408838688935a79f57d6b1267255 /drivers/md/bcache/movinggc.c | |
parent | 10d9dcf6ee5909e1aabd3685c60fdd1b1306d046 (diff) |
bcache: stop moving_gc marking buckets that can't be moved.
Signed-off-by: Nicholas Swenson <nks@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/movinggc.c')
-rw-r--r-- | drivers/md/bcache/movinggc.c | 5 |
1 files changed, 4 insertions, 1 deletions
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) | |||
215 | ca->heap.used = 0; | 215 | ca->heap.used = 0; |
216 | 216 | ||
217 | for_each_bucket(b, ca) { | 217 | for_each_bucket(b, ca) { |
218 | if (!GC_SECTORS_USED(b)) | 218 | if (GC_MARK(b) == GC_MARK_METADATA || |
219 | !GC_SECTORS_USED(b) || | ||
220 | GC_SECTORS_USED(b) == ca->sb.bucket_size || | ||
221 | atomic_read(&b->pin)) | ||
219 | continue; | 222 | continue; |
220 | 223 | ||
221 | if (!heap_full(&ca->heap)) { | 224 | if (!heap_full(&ca->heap)) { |