]> git.karo-electronics.de Git - karo-tx-linux.git/commit
bcache: Don't bother with bucket refcount for btree node allocations
authorKent Overstreet <kmo@daterainc.com>
Wed, 24 Jul 2013 23:46:42 +0000 (16:46 -0700)
committerKent Overstreet <kmo@daterainc.com>
Wed, 11 Sep 2013 02:04:51 +0000 (19:04 -0700)
commit9df794288031f25eb7ea9cad1ab330a77f6afac8
tree0b2262f8cffe4b968bcbe43729a17c73da001c08
parent295e0820fe16ec54fabeac4b7c776e319142ed7b
bcache: Don't bother with bucket refcount for btree node allocations

The bucket refcount (dropped with bkey_put()) is only needed to prevent
the newly allocated bucket from being garbage collected until we've
added a pointer to it somewhere. But for btree node allocations, the
fact that we have btree nodes locked is enough to guard against races
with garbage collection.

Eventually the per bucket refcount is going to be replaced with
something specific to bch_alloc_sectors().

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