• Kent Overstreet's avatar
    bcachefs: New locking functions · ca7d8fca
    Kent Overstreet authored
    In the future, with the new deadlock cycle detector, we won't be using
    bare six_lock_* anymore: lock wait entries will all be embedded in
    btree_trans, and we will need a btree_trans context whenever locking a
    btree node.
    
    This patch plumbs a btree_trans to the few places that need it, and adds
    two new locking functions
     - btree_node_lock_nopath, which may fail returning a transaction
       restart, and
     - btree_node_lock_nopath_nofail, to be used in places where we know we
       cannot deadlock (i.e. because we're holding no other locks).
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    ca7d8fca
btree_locking.h 10.8 KB