bcache: bugfix - moving_gc now moves only correct buckets
authorNicholas Swenson <nks@daterainc.com>
Fri, 8 Nov 2013 01:53:19 +0000 (17:53 -0800)
committerKent Overstreet <kmo@daterainc.com>
Mon, 16 Dec 2013 22:22:58 +0000 (14:22 -0800)
commit981aa8c091e164ea51dd1e81b71a1f3852bbcceb
tree63b14b1df54db25daa2ce46c8f42b5cff0ab1b89
parentbee63f40cb5f5e8ab2abfbc85acde99cc0acd4b5
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>
drivers/md/bcache/alloc.c
drivers/md/bcache/bcache.h
drivers/md/bcache/movinggc.c