diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-16 19:29:22 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-16 19:40:33 -0400 |
commit | abfdc593a532abaa40ac6ca87c1e0c86459f8c87 (patch) | |
tree | 4db627c2564af70a98c53c5747e543a7b04465c2 /libbcachefs/btree_iter.c | |
parent | f1e87c66af3ab12ba7bdb0cc61436c8263e08c85 (diff) |
Update bcachefs sources to 83338f5b2cb8 bcachefs: fix for building in userspace
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); } |