summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-01-03 22:42:33 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-06 05:24:20 +0100
commitc72e4d7a30670b59dcf32fb79b2c814a09171912 (patch)
tree82604fceee268f0348f1ad603d8fec05a1a6fe10 /fs/bcachefs/btree_io.c
parentbcachefs: don't clear accessed bit in btree node fill (diff)
downloadlinux-c72e4d7a30670b59dcf32fb79b2c814a09171912.tar.xz
linux-c72e4d7a30670b59dcf32fb79b2c814a09171912.zip
bcachefs: add time_stats for btree_node_read_done()
Seeing weird latency issues in the btree node read path - add one bch2_btree_node_read_done(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_io.c')
-rw-r--r--fs/bcachefs/btree_io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c
index 38d27cae49ea..cf5089cc358e 100644
--- a/fs/bcachefs/btree_io.c
+++ b/fs/bcachefs/btree_io.c
@@ -942,6 +942,7 @@ int bch2_btree_node_read_done(struct bch_fs *c, struct bch_dev *ca,
unsigned ptr_written = btree_ptr_sectors_written(&b->key);
struct printbuf buf = PRINTBUF;
int ret = 0, retry_read = 0, write = READ;
+ u64 start_time = local_clock();
b->version_ondisk = U16_MAX;
/* We might get called multiple times on read retry: */
@@ -1209,6 +1210,7 @@ int bch2_btree_node_read_done(struct bch_fs *c, struct bch_dev *ca,
out:
mempool_free(iter, &c->fill_iter);
printbuf_exit(&buf);
+ bch2_time_stats_update(&c->times[BCH_TIME_btree_node_read_done], start_time);
return retry_read;
fsck_err:
if (ret == -BCH_ERR_btree_node_read_err_want_retry ||