]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: Explicitly track btree node's parent
authorKent Overstreet <kmo@daterainc.com>
Thu, 25 Jul 2013 00:20:19 +0000 (17:20 -0700)
committerKent Overstreet <kmo@daterainc.com>
Mon, 11 Nov 2013 05:55:57 +0000 (21:55 -0800)
commitd22b4dd82a307a2a310008e8e10ab8e39e1f9027
tree992f1de98ba935284feac7569eea7d86dcf5bdd7
parent0d3e73d9e8b6732082971ae8cd55e4310d3056aa
bcache: Explicitly track btree node's parent

This is prep work for the reworked btree insertion code.

The way we set b->parent is ugly and hacky... the problem is, when
btree_split() or garbage collection splits or rewrites a btree node, the
parent changes for all its (potentially already cached) children.

I may change this later and add some code to look through the btree node
cache and find all our cached child nodes and change the parent pointer
then...

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