diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-15 21:04:40 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-21 19:27:09 +0100 |
commit | fa3185af43dce43a23df78c122bef860bcd4bf40 (patch) | |
tree | 9a61a0ae05b689c85565e8afd6f84f9a86966262 /fs/bcachefs/move.c | |
parent | bcachefs: bch2_kthread_io_clock_wait() no longer sleeps until full amount (diff) | |
download | linux-fa3185af43dce43a23df78c122bef860bcd4bf40.tar.xz linux-fa3185af43dce43a23df78c122bef860bcd4bf40.zip |
bcachefs: Re-add move_extent_write tracepoint
It appears this was accidentally deleted at some point - also, do a bit
of cleanup.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/move.c')
-rw-r--r-- | fs/bcachefs/move.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c index a9e0920b34f3..7a66706e4dce 100644 --- a/fs/bcachefs/move.c +++ b/fs/bcachefs/move.c @@ -111,6 +111,15 @@ static void move_write(struct moving_io *io) return; } + if (trace_move_extent_write_enabled()) { + struct bch_fs *c = io->write.op.c; + struct printbuf buf = PRINTBUF; + + bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(io->write.k.k)); + trace_move_extent_write(c, buf.buf); + printbuf_exit(&buf); + } + closure_get(&io->write.ctxt->cl); atomic_add(io->write_sectors, &io->write.ctxt->write_sectors); atomic_inc(&io->write.ctxt->write_ios); |