diff options
author | Qu Wenruo <wqu@suse.com> | 2024-04-30 01:23:06 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-07-11 16:33:21 +0300 |
commit | c77a8c61002e91d859e118008fd495efbe1d9373 (patch) | |
tree | bdea6b735810f7e578aa2c34c54bd0adce08a25d /include/trace/events | |
parent | e28b851ed9b232c3b84cb8d0fedbdfa8ca881386 (diff) | |
download | linux-c77a8c61002e91d859e118008fd495efbe1d9373.tar.xz |
btrfs: remove extent_map::block_start member
The member extent_map::block_start can be calculated from
extent_map::disk_bytenr + extent_map::offset for regular extents.
And otherwise just extent_map::disk_bytenr.
And this is already validated by the validate_extent_map(). Now we can
remove the member.
However there is a special case in btrfs_create_dio_extent() where we
for NOCOW/PREALLOC ordered extents cannot directly use the resulting
btrfs_file_extent, as btrfs_split_ordered_extent() cannot handle them
yet.
So for that call site, we pass file_extent->disk_bytenr +
file_extent->num_bytes as disk_bytenr for the ordered extent, and 0 for
offset.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/trace/events')
-rw-r--r-- | include/trace/events/btrfs.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index 69bef548818c..eeb56975bee7 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h @@ -291,7 +291,6 @@ TRACE_EVENT_CONDITION(btrfs_get_extent, __field( u64, ino ) __field( u64, start ) __field( u64, len ) - __field( u64, block_start ) __field( u32, flags ) __field( int, refs ) ), @@ -301,18 +300,15 @@ TRACE_EVENT_CONDITION(btrfs_get_extent, __entry->ino = btrfs_ino(inode); __entry->start = map->start; __entry->len = map->len; - __entry->block_start = map->block_start; __entry->flags = map->flags; __entry->refs = refcount_read(&map->refs); ), - TP_printk_btrfs( -"root=%llu(%s) ino=%llu start=%llu len=%llu block_start=%llu(%s) flags=%s refs=%u", + TP_printk_btrfs("root=%llu(%s) ino=%llu start=%llu len=%llu flags=%s refs=%u", show_root_type(__entry->root_objectid), __entry->ino, __entry->start, __entry->len, - show_map_type(__entry->block_start), show_map_flags(__entry->flags), __entry->refs) ); @@ -2608,7 +2604,6 @@ TRACE_EVENT(btrfs_extent_map_shrinker_remove_em, __field( u64, root_id ) __field( u64, start ) __field( u64, len ) - __field( u64, block_start ) __field( u32, flags ) ), @@ -2617,15 +2612,12 @@ TRACE_EVENT(btrfs_extent_map_shrinker_remove_em, __entry->root_id = inode->root->root_key.objectid; __entry->start = em->start; __entry->len = em->len; - __entry->block_start = em->block_start; __entry->flags = em->flags; ), - TP_printk_btrfs( -"ino=%llu root=%llu(%s) start=%llu len=%llu block_start=%llu(%s) flags=%s", + TP_printk_btrfs("ino=%llu root=%llu(%s) start=%llu len=%llu flags=%s", __entry->ino, show_root_type(__entry->root_id), __entry->start, __entry->len, - show_map_type(__entry->block_start), show_map_flags(__entry->flags)) ); |