mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-07 19:20:44 +00:00
scoutfs: trace btree dirty blocks
Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -754,6 +754,12 @@ retry:
|
||||
if (le64_to_cpu(bring->next_block) == le64_to_cpu(bring->nr_blocks))
|
||||
bring->next_block = 0;
|
||||
|
||||
trace_scoutfs_btree_dirty_block(sb, blkno, seq,
|
||||
le64_to_cpu(bring->next_block), le64_to_cpu(bring->next_seq),
|
||||
bti->cur_dirtied, bti->old_dirtied,
|
||||
bt ? le64_to_cpu(bt->hdr.blkno) : 0,
|
||||
bt ? le64_to_cpu(bt->hdr.seq) : 0);
|
||||
|
||||
/* force advancing if migration's done and we didn't just wrap */
|
||||
if (all_roots_migrated(super) && !first_block_in_half(bring) &&
|
||||
scoutfs_trigger(sb, BTREE_ADVANCE_RING_HALF))
|
||||
|
||||
@@ -2258,6 +2258,44 @@ TRACE_EVENT(scoutfs_btree_read_error,
|
||||
__entry->fsid, __entry->blkno, __entry->seq)
|
||||
);
|
||||
|
||||
TRACE_EVENT(scoutfs_btree_dirty_block,
|
||||
TP_PROTO(struct super_block *sb, u64 blkno, u64 seq, u64 next_block,
|
||||
u64 next_seq, unsigned long cur_dirtied,
|
||||
unsigned long old_dirtied, u64 bt_blkno, u64 bt_seq),
|
||||
|
||||
TP_ARGS(sb, blkno, seq, next_block, next_seq, cur_dirtied, old_dirtied,
|
||||
bt_blkno, bt_seq),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(__u64, fsid)
|
||||
__field(__u64, blkno)
|
||||
__field(__u64, seq)
|
||||
__field(__u64, next_block)
|
||||
__field(__u64, next_seq)
|
||||
__field(unsigned long, cur_dirtied)
|
||||
__field(unsigned long, old_dirtied)
|
||||
__field(__u64, bt_blkno)
|
||||
__field(__u64, bt_seq)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->fsid = FSID_ARG(sb);
|
||||
__entry->blkno = blkno;
|
||||
__entry->seq = seq;
|
||||
__entry->next_block = next_block;
|
||||
__entry->next_seq = next_seq;
|
||||
__entry->cur_dirtied = cur_dirtied;
|
||||
__entry->old_dirtied = old_dirtied;
|
||||
__entry->bt_blkno = bt_blkno;
|
||||
__entry->bt_seq = bt_seq;
|
||||
),
|
||||
|
||||
TP_printk("fsid "FSID_FMT" blkno %llu seq %llu next_block %llu next_seq %llu cur_dirtied %lu old_dirtied %lu bt_blkno %llu bt_seq %llu",
|
||||
__entry->fsid, __entry->blkno, __entry->seq,
|
||||
__entry->next_block, __entry->next_seq, __entry->cur_dirtied,
|
||||
__entry->old_dirtied, __entry->bt_blkno, __entry->bt_seq)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(scoutfs_extent_class,
|
||||
TP_PROTO(struct super_block *sb, struct scoutfs_extent *ext),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user