summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/alloc.c
diff options
context:
space:
mode:
authorNicholas Swenson <nks@daterainc.com>2013-11-08 05:53:19 +0400
committerKent Overstreet <kmo@daterainc.com>2013-12-17 02:22:58 +0400
commit981aa8c091e164ea51dd1e81b71a1f3852bbcceb (patch)
tree63b14b1df54db25daa2ce46c8f42b5cff0ab1b89 /drivers/md/bcache/alloc.c
parentbee63f40cb5f5e8ab2abfbc85acde99cc0acd4b5 (diff)
downloadlinux-981aa8c091e164ea51dd1e81b71a1f3852bbcceb.tar.xz
bcache: bugfix - moving_gc now moves only correct buckets
Removed gc_move_threshold because picking buckets only by threshold could lead moving extra buckets (ei. if there are buckets at the threshold that aren't supposed to be moved do to space considerations). This is replaced by a GC_MOVE bit in the gc_mark bitmask. Now only marked buckets get moved. Signed-off-by: Nicholas Swenson <nks@daterainc.com> Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/alloc.c')
-rw-r--r--drivers/md/bcache/alloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c
index 2b46bf1d7e40..4c9852d92b0a 100644
--- a/drivers/md/bcache/alloc.c
+++ b/drivers/md/bcache/alloc.c
@@ -421,9 +421,11 @@ out:
if (watermark <= WATERMARK_METADATA) {
SET_GC_MARK(b, GC_MARK_METADATA);
+ SET_GC_MOVE(b, 0);
b->prio = BTREE_PRIO;
} else {
SET_GC_MARK(b, GC_MARK_RECLAIMABLE);
+ SET_GC_MOVE(b, 0);
b->prio = INITIAL_PRIO;
}