bcachefs: Improve btree_node_mem_ptr optimization
This patch checks b->hash_val before attempting to lock the node in the
btree, which makes it more equivalent to the "lookup in hash table"
path - and potentially avoids an unnecessary transaction restart if
btree_node_mem_ptr(k) no longer points to the node we want.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Showing
Please register or sign in to comment