mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
bcachefs: trace_extent_trim_atomic
Add a tracepoint for when we insert only part of an extent, due to too many overwrites. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
e04c78d86a
commit
0f4dd2ce35
2 changed files with 17 additions and 1 deletions
|
|
@ -139,6 +139,17 @@ int bch2_extent_trim_atomic(struct btree_trans *trans,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
bch2_cut_back(end, k);
|
||||
/* tracepoint */
|
||||
|
||||
if (bpos_lt(end, k->k.p)) {
|
||||
if (trace_extent_trim_atomic_enabled()) {
|
||||
CLASS(printbuf, buf)();
|
||||
bch2_bpos_to_text(&buf, end);
|
||||
prt_newline(&buf);
|
||||
bch2_bkey_val_to_text(&buf, trans->c, bkey_i_to_s_c(k));
|
||||
trace_extent_trim_atomic(trans->c, buf.buf);
|
||||
}
|
||||
bch2_cut_back(end, k);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1490,6 +1490,11 @@ DEFINE_EVENT(fs_str, io_move_evacuate_bucket,
|
|||
TP_ARGS(c, str)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(fs_str, extent_trim_atomic,
|
||||
TP_PROTO(struct bch_fs *c, const char *str),
|
||||
TP_ARGS(c, str)
|
||||
);
|
||||
|
||||
#ifdef CONFIG_BCACHEFS_PATH_TRACEPOINTS
|
||||
|
||||
TRACE_EVENT(update_by_path,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue