summaryrefslogtreecommitdiff
path: root/libbcachefs/super.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-10-12 16:29:56 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2022-10-15 01:04:30 -0400
commite0a51ccce8533a91c7cc0cd0adc5662697c9bcfa (patch)
tree91408761ffbd7da783886c94a354d3b642e10587 /libbcachefs/super.c
parent3165f53b28b87b3c46c95763bae5e40a29166e2e (diff)
Update bcachefs sources to 3e93567c51 bcachefs: Switch to local_clock() for fastpath time source
Diffstat (limited to 'libbcachefs/super.c')
-rw-r--r--libbcachefs/super.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libbcachefs/super.c b/libbcachefs/super.c
index 9df08289..3f674bf0 100644
--- a/libbcachefs/super.c
+++ b/libbcachefs/super.c
@@ -895,6 +895,12 @@ int bch2_fs_start(struct bch_fs *c)
bch2_dev_allocator_add(c, ca);
bch2_recalc_capacity(c);
+ for (i = 0; i < BCH_TRANSACTIONS_NR; i++) {
+ mutex_lock(&c->btree_transaction_stats[i].lock);
+ bch2_time_stats_init(&c->btree_transaction_stats[i].lock_hold_times);
+ mutex_unlock(&c->btree_transaction_stats[i].lock);
+ }
+
ret = BCH_SB_INITIALIZED(c->disk_sb.sb)
? bch2_fs_recovery(c)
: bch2_fs_initialize(c);