diff options
Diffstat (limited to 'libbcachefs/btree_iter.c')
-rw-r--r-- | libbcachefs/btree_iter.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libbcachefs/btree_iter.c b/libbcachefs/btree_iter.c index 2357af3e..51bcdc6c 100644 --- a/libbcachefs/btree_iter.c +++ b/libbcachefs/btree_iter.c @@ -1729,7 +1729,9 @@ bch2_btree_iter_traverse(struct btree_iter *iter) if (ret) return ret; - btree_path_set_should_be_locked(trans->paths + iter->path); + struct btree_path *path = btree_iter_path(trans, iter); + if (btree_path_node(path, path->level)) + btree_path_set_should_be_locked(path); return 0; } @@ -2905,7 +2907,7 @@ u32 bch2_trans_begin(struct btree_trans *trans) if (!IS_ENABLED(CONFIG_BCACHEFS_NO_LATENCY_ACCT) && time_after64(now, trans->last_begin_time + 10)) - __time_stats_update(&btree_trans_stats(trans)->duration, + __bch2_time_stats_update(&btree_trans_stats(trans)->duration, trans->last_begin_time, now); if (!trans->restarted && @@ -3230,7 +3232,7 @@ void bch2_fs_btree_iter_exit(struct bch_fs *c) s < c->btree_transaction_stats + ARRAY_SIZE(c->btree_transaction_stats); s++) { kfree(s->max_paths_text); - time_stats_exit(&s->lock_hold_times); + bch2_time_stats_exit(&s->lock_hold_times); } if (c->btree_trans_barrier_initialized) @@ -3246,8 +3248,8 @@ void bch2_fs_btree_iter_init_early(struct bch_fs *c) for (s = c->btree_transaction_stats; s < c->btree_transaction_stats + ARRAY_SIZE(c->btree_transaction_stats); s++) { - time_stats_init(&s->duration); - time_stats_init(&s->lock_hold_times); + bch2_time_stats_init(&s->duration); + bch2_time_stats_init(&s->lock_hold_times); mutex_init(&s->lock); } |