Skip to content

Commit

Permalink
bcache: stop moving_gc marking buckets that can't be moved.
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Swenson <nks@daterainc.com>
  • Loading branch information
Nicholas Swenson authored and Kent Overstreet committed Mar 18, 2014
1 parent 10d9dcf commit 3f6ef38
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/md/bcache/movinggc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3f6ef38

Please sign in to comment.