diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-30 16:04:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:58 -0400 |
commit | 3d86f13df67b554a7b27e28a4b144425710409bf (patch) | |
tree | f291e3c4608fab33b75b9d0a51ce6cbf8d83807b /fs/bcachefs/btree_update_interior.c | |
parent | 25d8f40560e75aea107b0e773f8712931173ded6 (diff) | |
download | linux-3d86f13df67b554a7b27e28a4b144425710409bf.tar.gz linux-3d86f13df67b554a7b27e28a4b144425710409bf.tar.bz2 linux-3d86f13df67b554a7b27e28a4b144425710409bf.zip |
bcachefs: Improve trans_restart_split_race tracepoint
Seeing occasional test failures where we get stuck in a livelock that
involves this event - this will help track it down.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_update_interior.c')
-rw-r--r-- | fs/bcachefs/btree_update_interior.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c index a58d2a142b67..6ba0954e648e 100644 --- a/fs/bcachefs/btree_update_interior.c +++ b/fs/bcachefs/btree_update_interior.c @@ -1680,7 +1680,7 @@ static int bch2_btree_insert_node(struct btree_update *as, struct btree_trans *t BUG_ON(!as || as->b); bch2_verify_keylist_sorted(keys); - if (!(local_clock() & 63)) + if ((local_clock() & 63) == 63) return btree_trans_restart(trans, BCH_ERR_transaction_restart_split_race); ret = bch2_btree_node_lock_write(trans, path, &b->c); @@ -1720,7 +1720,7 @@ split: * bch2_btree_path_upgrade() and allocating more nodes: */ if (b->c.level >= as->update_level) { - trace_and_count(c, trans_restart_split_race, trans, _THIS_IP_); + trace_and_count(c, trans_restart_split_race, trans, _THIS_IP_, b); return btree_trans_restart(trans, BCH_ERR_transaction_restart_split_race); } |