]> git.karo-electronics.de Git - karo-tx-linux.git/commit
bcache: Add btree_map() functions
authorKent Overstreet <kmo@daterainc.com>
Wed, 11 Sep 2013 01:48:51 +0000 (18:48 -0700)
committerKent Overstreet <kmo@daterainc.com>
Wed, 11 Sep 2013 01:48:51 +0000 (18:48 -0700)
commit968463af00dfacdf5c1564d44a386d06a4035c71
treed94e0d5f91c7fc82b84fa273a65eb0ec86c4d0cd
parente281af1e989184b959cc62ff256df64156b0b853
bcache: Add btree_map() functions

Lots of stuff has been open coding its own btree traversal - which is
generally pretty simple code, but there are a few subtleties.

This adds new new functions, bch_btree_map_nodes() and
bch_btree_map_keys(), which do the traversal for you. Everything that's
open coding btree traversal now (with the exception of garbage
collection) is slowly going to be converted to these two functions;
being able to write other code at a higher level of abstraction  is a
big improvement w.r.t. overall code quality.

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