]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/btree_locking.c
Update bcachefs sources to ed2a5f4260 bcachefs: Add a missing bch2_btree_path_travers...
[bcachefs-tools-debian] / libbcachefs / btree_locking.c
index dce2dc0cc0c555a7e34873d05d6b0cd4c14cb191..d3326e980db998f933e846d21b11ea88f925d4a2 100644 (file)
@@ -359,8 +359,18 @@ static inline bool btree_path_get_locks(struct btree_trans *trans,
 
                if (!(upgrade
                      ? bch2_btree_node_upgrade(trans, path, l)
-                     : bch2_btree_node_relock(trans, path, l)))
+                     : bch2_btree_node_relock(trans, path, l))) {
+                       (upgrade
+                        ? trace_node_upgrade_fail
+                        : trace_node_relock_fail)(0, _RET_IP_,
+                                       path->btree_id, &path->pos,
+                                       l, path->l[l].lock_seq,
+                                       path->l[l].b,
+                                       is_btree_node(path, l)
+                                       ? path->l[l].b->c.lock.state.seq
+                                       : 0);
                        fail_idx = l;
+               }
 
                l++;
        } while (l < path->locks_want);