Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f6ef381 authored by Nicholas Swenson's avatar Nicholas Swenson Committed by Kent Overstreet
Browse files

bcache: stop moving_gc marking buckets that can't be moved.

parent 10d9dcf6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)) {