mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
btrfs: add a btrfs_finish_ordered_extent helper
Add a helper to complete an ordered_extent without first doing a lookup. The tracepoint cannot use the ordered_extent class as we also want to print the range. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
2d6f107ea6
commit
122e9ede53
@@ -661,6 +661,35 @@ DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_mark_finished,
|
||||
TP_ARGS(inode, ordered)
|
||||
);
|
||||
|
||||
TRACE_EVENT(btrfs_finish_ordered_extent,
|
||||
|
||||
TP_PROTO(const struct btrfs_inode *inode, u64 start, u64 len,
|
||||
bool uptodate),
|
||||
|
||||
TP_ARGS(inode, start, len, uptodate),
|
||||
|
||||
TP_STRUCT__entry_btrfs(
|
||||
__field( u64, ino )
|
||||
__field( u64, start )
|
||||
__field( u64, len )
|
||||
__field( bool, uptodate )
|
||||
__field( u64, root_objectid )
|
||||
),
|
||||
|
||||
TP_fast_assign_btrfs(inode->root->fs_info,
|
||||
__entry->ino = btrfs_ino(inode);
|
||||
__entry->start = start;
|
||||
__entry->len = len;
|
||||
__entry->uptodate = uptodate;
|
||||
__entry->root_objectid = inode->root->root_key.objectid;
|
||||
),
|
||||
|
||||
TP_printk_btrfs("root=%llu(%s) ino=%llu start=%llu len=%llu uptodate=%d",
|
||||
show_root_type(__entry->root_objectid),
|
||||
__entry->ino, __entry->start,
|
||||
__entry->len, !!__entry->uptodate)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(btrfs__writepage,
|
||||
|
||||
TP_PROTO(const struct page *page, const struct inode *inode,
|
||||
|
||||
Reference in New Issue
Block a user