diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-09-13 16:04:49 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:12 -0400 |
commit | aae4eea60cf0c824abe6be809f0260df8574f49a (patch) | |
tree | ab9dd2ae4f4be916b3cad07badc7676ecce85c97 /fs/bcachefs/btree_locking.h | |
parent | aa76bd3321f018af08629bb98ba2d5f0b4b18546 (diff) |
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>
Diffstat (limited to 'fs/bcachefs/btree_locking.h')
0 files changed, 0 insertions, 0 deletions