Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bcachefs: Add a tracepoint for journal entry close

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>

+21
+2
fs/bcachefs/journal.c
··· 184 184 /* Close out old buffer: */ 185 185 buf->data->u64s = cpu_to_le32(old.cur_entry_offset); 186 186 187 + trace_journal_entry_close(c, vstruct_bytes(buf->data)); 188 + 187 189 sectors = vstruct_blocks_plus(buf->data, c->block_bits, 188 190 buf->u64s_reserved) << c->block_bits; 189 191 BUG_ON(sectors > buf->sectors);
+19
fs/bcachefs/trace.h
··· 188 188 TP_ARGS(c) 189 189 ); 190 190 191 + TRACE_EVENT(journal_entry_close, 192 + TP_PROTO(struct bch_fs *c, unsigned bytes), 193 + TP_ARGS(c, bytes), 194 + 195 + TP_STRUCT__entry( 196 + __field(dev_t, dev ) 197 + __field(u32, bytes ) 198 + ), 199 + 200 + TP_fast_assign( 201 + __entry->dev = c->dev; 202 + __entry->bytes = bytes; 203 + ), 204 + 205 + TP_printk("%d,%d entry bytes %u", 206 + MAJOR(__entry->dev), MINOR(__entry->dev), 207 + __entry->bytes) 208 + ); 209 + 191 210 DEFINE_EVENT(bio, journal_write, 192 211 TP_PROTO(struct bio *bio), 193 212 TP_ARGS(bio)