diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-05-11 16:13:18 +0100 |
|---|---|---|
| committer | Filipe Manana <fdmanana@suse.com> | 2026-06-09 11:49:24 +0100 |
| commit | 4f065ebdf8c5ad477dc7be57c76e0fcb50670a6c (patch) | |
| tree | 65fc1a6034885340fa0a21ecc21afe479992497a /include | |
| parent | e1443032400a7e9d205c75730e8035e2db779231 (diff) | |
btrfs: tracepoints: add trace event for btrfs_record_new_subvolume()
btrfs_record_new_subvolume() is an important operation that affects
inode logging and is called during subvolume creation. Add a trace event
for it to help debug issues.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/trace/events/btrfs.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index a14a8d32a6f1..47e6f382e22a 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h @@ -1456,6 +1456,31 @@ TRACE_EVENT(btrfs_record_snapshot_destroy, __entry->dir) ); +TRACE_EVENT(btrfs_record_new_subvolume, + + TP_PROTO(const struct btrfs_trans_handle *trans, + const struct btrfs_inode *dir), + + TP_ARGS(trans, dir), + + TP_STRUCT__entry_btrfs( + __field( u64, root_objectid ) + __field( u64, transid ) + __field( u64, dir ) + ), + + TP_fast_assign( + TP_fast_assign_fsid(trans->fs_info); + __entry->root_objectid = btrfs_root_id(dir->root); + __entry->transid = trans->transid; + __entry->dir = btrfs_ino(dir); + ), + + TP_printk_btrfs("root=%llu(%s) transid=%llu dir=%llu", + show_root_type(__entry->root_objectid), __entry->transid, + __entry->dir) +); + TRACE_EVENT(btrfs_sync_fs, TP_PROTO(const struct btrfs_fs_info *fs_info, int wait), |
