History

Merge tag 'for-6.8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs updates from David Sterba: "There are no exciting changes for users, it's been mostly API conversions and some fixes or refactoring. The mount API conversion is a base for future improvements that would come with VFS. Metadata processing has been converted to folios, not yet enabling the large folios but it's one patch away once everything gets tested enough. Core changes: - convert extent buffers to folios: - direct API conversion where possible - performance can drop by a few percent on metadata heavy workloads, the folio sizes are not constant and the calculations add up in the item helpers - both regular and subpage modes - data cannot be converted yet, we need to port that to iomap and there are some other generic changes required - convert mount to the new API, should not be user visible: - options deprecated long time ago have been removed: inode_cache, recovery - the new logic that splits mount to two phases slightly changes timing of device scanning for multi-device filesystems - LSM options will now work (like for selinux) - convert delayed nodes radix tree to xarray, preserving the preload-like logic that still allows to allocate with GFP_NOFS - more validation of sysfs value of scrub_speed_max - refactor chunk map structure, reduce size and improve performance - extent map refactoring, smaller data structures, improved performance - reduce size of struct extent_io_tree, embedded in several structures - temporary pages used for compression are cached and attached to a shrinker, this may slightly improve performance - in zoned mode, remove redirty extent buffer tracking, zeros are written in case an out-of-order is detected and proper data are written to the actual write pointer - cleanups, refactoring, error message improvements, updated tests - verify and update branch name or tag - remove unwanted text" * tag 'for-6.8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (89 commits) btrfs: pass btrfs_io_geometry into btrfs_max_io_len btrfs: pass struct btrfs_io_geometry to set_io_stripe btrfs: open code set_io_stripe for RAID56 btrfs: change block mapping to switch/case in btrfs_map_block btrfs: factor out block mapping for single profiles btrfs: factor out block mapping for RAID5/6 btrfs: reduce scope of data_stripes in btrfs_map_block btrfs: factor out block mapping for RAID10 btrfs: factor out block mapping for DUP profiles btrfs: factor out RAID1 block mapping btrfs: factor out block-mapping for RAID0 btrfs: re-introduce struct btrfs_io_geometry btrfs: factor out helper for single device IO check btrfs: migrate btrfs_repair_io_failure() to folio interfaces btrfs: migrate eb_bitmap_offset() to folio interfaces btrfs: migrate various end io functions to folios btrfs: migrate subpage code to folio interfaces btrfs: migrate get_eb_page_index() and get_eb_offset_in_page() to folios btrfs: don't double put our subpage reference in alloc_extent_buffer btrfs: cleanup metadata page pointer usage ...

Linus Torvalds committed 2 years ago

Commit affc5af2 parents 12958e9 e94dfb761 files · +3883 −3184Browse files

Showing the changes to include/trace (1 of 61 files). Show all

Unified · Split

include/trace/events/btrfs.h+30−48
@@ -21,7 +21,7 @@ struct btrfs_delayed_data_ref; · 20 unmodified lines
21struct btrfs_delayed_ref_head;21struct btrfs_delayed_ref_head;
22struct btrfs_block_group;22struct btrfs_block_group;
23struct btrfs_free_cluster;23struct btrfs_free_cluster;
24struct map_lookup;24struct btrfs_chunk_map;
25struct extent_buffer;25struct extent_buffer;
26struct btrfs_work;26struct btrfs_work;
27struct btrfs_workqueue;27struct btrfs_workqueue;
@@ -265,20 +265,20 @@ DEFINE_EVENT(btrfs__inode, btrfs_inode_evict, · 237 unmodified lines
265 __print_symbolic_u64(type, \265 __print_symbolic_u64(type, \
266 { EXTENT_MAP_LAST_BYTE, "LAST_BYTE" }, \266 { EXTENT_MAP_LAST_BYTE, "LAST_BYTE" }, \
267 { EXTENT_MAP_HOLE, "HOLE" }, \267 { EXTENT_MAP_HOLE, "HOLE" }, \
268 { EXTENT_MAP_INLINE, "INLINE" }, \268 { EXTENT_MAP_INLINE, "INLINE" })
269 { EXTENT_MAP_DELALLOC, "DELALLOC" })
270 269
271#define show_map_type(type) \270#define show_map_type(type) \
272 type, (type >= EXTENT_MAP_LAST_BYTE) ? "-" : __show_map_type(type)271 type, (type >= EXTENT_MAP_LAST_BYTE) ? "-" : __show_map_type(type)
273 272
274#define show_map_flags(flag) \273#define show_map_flags(flag) \
275 __print_flags(flag, "|", \274 __print_flags(flag, "|", \
276 { (1 << EXTENT_FLAG_PINNED), "PINNED" },\275 { EXTENT_FLAG_PINNED, "PINNED" },\
277 { (1 << EXTENT_FLAG_COMPRESSED), "COMPRESSED" },\276 { EXTENT_FLAG_COMPRESS_ZLIB, "COMPRESS_ZLIB" },\
278 { (1 << EXTENT_FLAG_PREALLOC), "PREALLOC" },\277 { EXTENT_FLAG_COMPRESS_LZO, "COMPRESS_LZO" },\
279 { (1 << EXTENT_FLAG_LOGGING), "LOGGING" },\278 { EXTENT_FLAG_COMPRESS_ZSTD, "COMPRESS_ZSTD" },\
280 { (1 << EXTENT_FLAG_FILLING), "FILLING" },\279 { EXTENT_FLAG_PREALLOC, "PREALLOC" },\
281 { (1 << EXTENT_FLAG_FS_MAPPING), "FS_MAPPING" })280 { EXTENT_FLAG_LOGGING, "LOGGING" },\
281 { EXTENT_FLAG_FILLING, "FILLING" })
282 282
283TRACE_EVENT_CONDITION(btrfs_get_extent,283TRACE_EVENT_CONDITION(btrfs_get_extent,
284 284
@@ -297,9 +297,8 @@ TRACE_EVENT_CONDITION(btrfs_get_extent, · 12 unmodified lines
297 __field( u64, orig_start )297 __field( u64, orig_start )
298 __field( u64, block_start )298 __field( u64, block_start )
299 __field( u64, block_len )299 __field( u64, block_len )
300 __field( unsigned long, flags )300 __field( u32, flags )
301 __field( int, refs )301 __field( int, refs )
302 __field( unsigned int, compress_type )
303 ),302 ),
304 303
305 TP_fast_assign_btrfs(root->fs_info,304 TP_fast_assign_btrfs(root->fs_info,
@@ -312,13 +311,11 @@ TRACE_EVENT_CONDITION(btrfs_get_extent, · 6 unmodified lines
312 __entry->block_len = map->block_len;311 __entry->block_len = map->block_len;
313 __entry->flags = map->flags;312 __entry->flags = map->flags;
314 __entry->refs = refcount_read(&map->refs);313 __entry->refs = refcount_read(&map->refs);
315 __entry->compress_type = map->compress_type;
316 ),314 ),
317 315
318 TP_printk_btrfs("root=%llu(%s) ino=%llu start=%llu len=%llu "316 TP_printk_btrfs("root=%llu(%s) ino=%llu start=%llu len=%llu "
319 "orig_start=%llu block_start=%llu(%s) "317 "orig_start=%llu block_start=%llu(%s) "
320 "block_len=%llu flags=%s refs=%u "318 "block_len=%llu flags=%s refs=%u",
321 "compress_type=%u",
322 show_root_type(__entry->root_objectid),319 show_root_type(__entry->root_objectid),
323 __entry->ino,320 __entry->ino,
324 __entry->start,321 __entry->start,
@@ -327,7 +324,7 @@ TRACE_EVENT_CONDITION(btrfs_get_extent, · 2 unmodified lines
327 show_map_type(__entry->block_start),324 show_map_type(__entry->block_start),
328 __entry->block_len,325 __entry->block_len,
329 show_map_flags(__entry->flags),326 show_map_flags(__entry->flags),
330 __entry->refs, __entry->compress_type)327 __entry->refs)
331);328);
332 329
333TRACE_EVENT(btrfs_handle_em_exist,330TRACE_EVENT(btrfs_handle_em_exist,
@@ -1061,7 +1058,7 @@ DEFINE_EVENT(btrfs_delayed_ref_head, run_delayed_ref_head, · 727 unmodified lines
1061DECLARE_EVENT_CLASS(btrfs__chunk,1058DECLARE_EVENT_CLASS(btrfs__chunk,
1062 1059
1063 TP_PROTO(const struct btrfs_fs_info *fs_info,1060 TP_PROTO(const struct btrfs_fs_info *fs_info,
1064 const struct map_lookup *map, u64 offset, u64 size),1061 const struct btrfs_chunk_map *map, u64 offset, u64 size),
1065 1062
1066 TP_ARGS(fs_info, map, offset, size),1063 TP_ARGS(fs_info, map, offset, size),
1067 1064
@@ -1095,7 +1092,7 @@ DECLARE_EVENT_CLASS(btrfs__chunk, · 27 unmodified lines
1095DEFINE_EVENT(btrfs__chunk, btrfs_chunk_alloc,1092DEFINE_EVENT(btrfs__chunk, btrfs_chunk_alloc,
1096 1093
1097 TP_PROTO(const struct btrfs_fs_info *fs_info,1094 TP_PROTO(const struct btrfs_fs_info *fs_info,
1098 const struct map_lookup *map, u64 offset, u64 size),1095 const struct btrfs_chunk_map *map, u64 offset, u64 size),
1099 1096
1100 TP_ARGS(fs_info, map, offset, size)1097 TP_ARGS(fs_info, map, offset, size)
1101);1098);
@@ -1103,7 +1100,7 @@ DEFINE_EVENT(btrfs__chunk, btrfs_chunk_alloc, · 1 unmodified line
1103DEFINE_EVENT(btrfs__chunk, btrfs_chunk_free,1100DEFINE_EVENT(btrfs__chunk, btrfs_chunk_free,
1104 1101
1105 TP_PROTO(const struct btrfs_fs_info *fs_info,1102 TP_PROTO(const struct btrfs_fs_info *fs_info,
1106 const struct map_lookup *map, u64 offset, u64 size),1103 const struct btrfs_chunk_map *map, u64 offset, u64 size),
1107 1104
1108 TP_ARGS(fs_info, map, offset, size)1105 TP_ARGS(fs_info, map, offset, size)
1109);1106);
@@ -2099,17 +2096,12 @@ TRACE_EVENT(btrfs_set_extent_bit, · 989 unmodified lines
2099 __field( unsigned, set_bits)2096 __field( unsigned, set_bits)
2100 ),2097 ),
2101 2098
2102 TP_fast_assign_btrfs(tree->fs_info,2099 TP_fast_assign_btrfs(extent_io_tree_to_fs_info(tree),
2103 __entry->owner = tree->owner;2100 const struct btrfs_inode *inode = extent_io_tree_to_inode_const(tree);
2104 if (tree->inode) {
2105 const struct btrfs_inode *inode = tree->inode;
2106 2101
2107 __entry->ino = btrfs_ino(inode);2102 __entry->owner = tree->owner;
2108 __entry->rootid = inode->root->root_key.objectid;2103 __entry->ino = inode ? btrfs_ino(inode) : 0;
2109 } else {2104 __entry->rootid = inode ? inode->root->root_key.objectid : 0;
2110 __entry->ino = 0;
2111 __entry->rootid = 0;
2112 }
2113 __entry->start = start;2105 __entry->start = start;
2114 __entry->len = len;2106 __entry->len = len;
2115 __entry->set_bits = set_bits;2107 __entry->set_bits = set_bits;
@@ -2137,17 +2129,12 @@ TRACE_EVENT(btrfs_clear_extent_bit, · 21 unmodified lines
2137 __field( unsigned, clear_bits)2129 __field( unsigned, clear_bits)
2138 ),2130 ),
2139 2131
2140 TP_fast_assign_btrfs(tree->fs_info,2132 TP_fast_assign_btrfs(extent_io_tree_to_fs_info(tree),
2141 __entry->owner = tree->owner;2133 const struct btrfs_inode *inode = extent_io_tree_to_inode_const(tree);
2142 if (tree->inode) {
2143 const struct btrfs_inode *inode = tree->inode;
2144 2134
2145 __entry->ino = btrfs_ino(inode);2135 __entry->owner = tree->owner;
2146 __entry->rootid = inode->root->root_key.objectid;2136 __entry->ino = inode ? btrfs_ino(inode) : 0;
2147 } else {2137 __entry->rootid = inode ? inode->root->root_key.objectid : 0;
2148 __entry->ino = 0;
2149 __entry->rootid = 0;
2150 }
2151 __entry->start = start;2138 __entry->start = start;
2152 __entry->len = len;2139 __entry->len = len;
2153 __entry->clear_bits = clear_bits;2140 __entry->clear_bits = clear_bits;
@@ -2176,17 +2163,12 @@ TRACE_EVENT(btrfs_convert_extent_bit, · 22 unmodified lines
2176 __field( unsigned, clear_bits)2163 __field( unsigned, clear_bits)
2177 ),2164 ),
2178 2165
2179 TP_fast_assign_btrfs(tree->fs_info,2166 TP_fast_assign_btrfs(extent_io_tree_to_fs_info(tree),
2180 __entry->owner = tree->owner;2167 const struct btrfs_inode *inode = extent_io_tree_to_inode_const(tree);
2181 if (tree->inode) {
2182 const struct btrfs_inode *inode = tree->inode;
2183 2168
2184 __entry->ino = btrfs_ino(inode);2169 __entry->owner = tree->owner;
2185 __entry->rootid = inode->root->root_key.objectid;2170 __entry->ino = inode ? btrfs_ino(inode) : 0;
2186 } else {2171 __entry->rootid = inode ? inode->root->root_key.objectid : 0;
2187 __entry->ino = 0;
2188 __entry->rootid = 0;
2189 }
2190 __entry->start = start;2172 __entry->start = start;
2191 __entry->len = len;2173 __entry->len = len;
2192 __entry->set_bits = set_bits;2174 __entry->set_bits = set_bits;