bcache: Rework allocator reserves
authorKent Overstreet <kmo@daterainc.com>
Tue, 17 Dec 2013 09:29:34 +0000 (01:29 -0800)
committerKent Overstreet <kmo@daterainc.com>
Wed, 8 Jan 2014 21:05:09 +0000 (13:05 -0800)
commit78365411b344df35a198b119133e6515c2dcfb9f
treee94c2e1bd0d5dc53e6a938b012e9b20d3a511eca
parent1dd13c8d3c2d82e1b668d0b4754591291656542a
bcache: Rework allocator reserves

We need a reserve for allocating buckets for new btree nodes - and now that
we've got multiple btrees, it really needs to be per btree.

This reworks the reserves so we've got separate freelists for each reserve
instead of watermarks, which seems to make things a bit cleaner, and it adds
some code so that btree_split() can make sure the reserve is available before it
starts.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
drivers/md/bcache/alloc.c
drivers/md/bcache/bcache.h
drivers/md/bcache/btree.c
drivers/md/bcache/btree.h
drivers/md/bcache/movinggc.c
drivers/md/bcache/super.c
drivers/md/bcache/sysfs.c
include/trace/events/bcache.h