diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-04-20 21:24:07 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:10:00 +0200 |
commit | 5a21764db13877eb1166baf12d2782ebb38b196e (patch) | |
tree | f539469217a371d21b34fbaf443d620f83aac463 /fs/bcachefs/data_update.c | |
parent | bcachefs: Drop a redundant error message (diff) | |
download | linux-5a21764db13877eb1166baf12d2782ebb38b196e.tar.xz linux-5a21764db13877eb1166baf12d2782ebb38b196e.zip |
bcachefs: Improve move path tracepoints
Move path tracepoints now include the key being moved. Also, add new
tracepoints for the start of move_extent, and evacuate_bucket.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/data_update.c')
-rw-r--r-- | fs/bcachefs/data_update.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/bcachefs/data_update.c b/fs/bcachefs/data_update.c index 7a5850679f16..cffb3c14d539 100644 --- a/fs/bcachefs/data_update.c +++ b/fs/bcachefs/data_update.c @@ -92,6 +92,17 @@ static int insert_snapshot_whiteouts(struct btree_trans *trans, return ret; } +static void trace_move_extent_finish2(struct bch_fs *c, struct bkey_s_c k) +{ + if (trace_move_extent_finish_enabled()) { + struct printbuf buf = PRINTBUF; + + bch2_bkey_val_to_text(&buf, c, k); + trace_move_extent_finish(c, buf.buf); + printbuf_exit(&buf); + } +} + static void trace_move_extent_fail2(struct data_update *m, struct bkey_s_c new, struct bkey_s_c wrote, @@ -342,7 +353,7 @@ restart_drop_extra_replicas: bch2_btree_iter_set_pos(&iter, next_pos); this_cpu_add(c->counters[BCH_COUNTER_move_extent_finish], new->k.size); - trace_move_extent_finish(&new->k); + trace_move_extent_finish2(c, bkey_i_to_s_c(&new->k_i)); } err: if (bch2_err_matches(ret, BCH_ERR_transaction_restart)) |