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
2121 struct btrfs_delayed_ref_head;
2222 struct btrfs_block_group;
2323 struct btrfs_free_cluster;
24−struct map_lookup;
24+struct btrfs_chunk_map;
2525 struct extent_buffer;
2626 struct btrfs_work;
2727 struct btrfs_workqueue;
@@ -265,20 +265,20 @@ DEFINE_EVENT(btrfs__inode, btrfs_inode_evict, · 237 unmodified lines
265265 __print_symbolic_u64(type, \
266266 { EXTENT_MAP_LAST_BYTE, "LAST_BYTE" }, \
267267 { EXTENT_MAP_HOLE, "HOLE" }, \
268− { EXTENT_MAP_INLINE, "INLINE" }, \
269− { EXTENT_MAP_DELALLOC, "DELALLOC" })
268+ { EXTENT_MAP_INLINE, "INLINE" })
270269
271270 #define show_map_type(type) \
272271 type, (type >= EXTENT_MAP_LAST_BYTE) ? "-" : __show_map_type(type)
273272
274273 #define show_map_flags(flag) \
275274 __print_flags(flag, "|", \
276− { (1 << EXTENT_FLAG_PINNED), "PINNED" },\
277− { (1 << EXTENT_FLAG_COMPRESSED), "COMPRESSED" },\
278− { (1 << EXTENT_FLAG_PREALLOC), "PREALLOC" },\
279− { (1 << EXTENT_FLAG_LOGGING), "LOGGING" },\
280− { (1 << EXTENT_FLAG_FILLING), "FILLING" },\
281− { (1 << EXTENT_FLAG_FS_MAPPING), "FS_MAPPING" })
275+ { EXTENT_FLAG_PINNED, "PINNED" },\
276+ { EXTENT_FLAG_COMPRESS_ZLIB, "COMPRESS_ZLIB" },\
277+ { EXTENT_FLAG_COMPRESS_LZO, "COMPRESS_LZO" },\
278+ { EXTENT_FLAG_COMPRESS_ZSTD, "COMPRESS_ZSTD" },\
279+ { EXTENT_FLAG_PREALLOC, "PREALLOC" },\
280+ { EXTENT_FLAG_LOGGING, "LOGGING" },\
281+ { EXTENT_FLAG_FILLING, "FILLING" })
282282
283283 TRACE_EVENT_CONDITION(btrfs_get_extent,
284284
@@ -297,9 +297,8 @@ TRACE_EVENT_CONDITION(btrfs_get_extent, · 12 unmodified lines
297297 __field( u64, orig_start )
298298 __field( u64, block_start )
299299 __field( u64, block_len )
300− __field( unsigned long, flags )
300+ __field( u32, flags )
301301 __field( int, refs )
302− __field( unsigned int, compress_type )
303302 ),
304303
305304 TP_fast_assign_btrfs(root->fs_info,
@@ -312,13 +311,11 @@ TRACE_EVENT_CONDITION(btrfs_get_extent, · 6 unmodified lines
312311 __entry->block_len = map->block_len;
313312 __entry->flags = map->flags;
314313 __entry->refs = refcount_read(&map->refs);
315− __entry->compress_type = map->compress_type;
316314 ),
317315
318316 TP_printk_btrfs("root=%llu(%s) ino=%llu start=%llu len=%llu "
319317 "orig_start=%llu block_start=%llu(%s) "
320− "block_len=%llu flags=%s refs=%u "
321− "compress_type=%u",
318+ "block_len=%llu flags=%s refs=%u",
322319 show_root_type(__entry->root_objectid),
323320 __entry->ino,
324321 __entry->start,
@@ -327,7 +324,7 @@ TRACE_EVENT_CONDITION(btrfs_get_extent, · 2 unmodified lines
327324 show_map_type(__entry->block_start),
328325 __entry->block_len,
329326 show_map_flags(__entry->flags),
330− __entry->refs, __entry->compress_type)
327+ __entry->refs)
331328 );
332329
333330 TRACE_EVENT(btrfs_handle_em_exist,
@@ -1061,7 +1058,7 @@ DEFINE_EVENT(btrfs_delayed_ref_head, run_delayed_ref_head, · 727 unmodified lines
10611058 DECLARE_EVENT_CLASS(btrfs__chunk,
10621059
10631060 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),
10651062
10661063 TP_ARGS(fs_info, map, offset, size),
10671064
@@ -1095,7 +1092,7 @@ DECLARE_EVENT_CLASS(btrfs__chunk, · 27 unmodified lines
10951092 DEFINE_EVENT(btrfs__chunk, btrfs_chunk_alloc,
10961093
10971094 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),
10991096
11001097 TP_ARGS(fs_info, map, offset, size)
11011098 );
@@ -1103,7 +1100,7 @@ DEFINE_EVENT(btrfs__chunk, btrfs_chunk_alloc, · 1 unmodified line
11031100 DEFINE_EVENT(btrfs__chunk, btrfs_chunk_free,
11041101
11051102 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),
11071104
11081105 TP_ARGS(fs_info, map, offset, size)
11091106 );
@@ -2099,17 +2096,12 @@ TRACE_EVENT(btrfs_set_extent_bit, · 989 unmodified lines
20992096 __field( unsigned, set_bits)
21002097 ),
21012098
2102− TP_fast_assign_btrfs(tree->fs_info,
2103− __entry->owner = tree->owner;
2104− if (tree->inode) {
2105− const struct btrfs_inode *inode = tree->inode;
2099+ TP_fast_assign_btrfs(extent_io_tree_to_fs_info(tree),
2100+ const struct btrfs_inode *inode = extent_io_tree_to_inode_const(tree);
21062101
2107− __entry->ino = btrfs_ino(inode);
2108− __entry->rootid = inode->root->root_key.objectid;
2109− } else {
2110− __entry->ino = 0;
2111− __entry->rootid = 0;
2112− }
2102+ __entry->owner = tree->owner;
2103+ __entry->ino = inode ? btrfs_ino(inode) : 0;
2104+ __entry->rootid = inode ? inode->root->root_key.objectid : 0;
21132105 __entry->start = start;
21142106 __entry->len = len;
21152107 __entry->set_bits = set_bits;
@@ -2137,17 +2129,12 @@ TRACE_EVENT(btrfs_clear_extent_bit, · 21 unmodified lines
21372129 __field( unsigned, clear_bits)
21382130 ),
21392131
2140− TP_fast_assign_btrfs(tree->fs_info,
2141− __entry->owner = tree->owner;
2142− if (tree->inode) {
2143− const struct btrfs_inode *inode = tree->inode;
2132+ TP_fast_assign_btrfs(extent_io_tree_to_fs_info(tree),
2133+ const struct btrfs_inode *inode = extent_io_tree_to_inode_const(tree);
21442134
2145− __entry->ino = btrfs_ino(inode);
2146− __entry->rootid = inode->root->root_key.objectid;
2147− } else {
2148− __entry->ino = 0;
2149− __entry->rootid = 0;
2150− }
2135+ __entry->owner = tree->owner;
2136+ __entry->ino = inode ? btrfs_ino(inode) : 0;
2137+ __entry->rootid = inode ? inode->root->root_key.objectid : 0;
21512138 __entry->start = start;
21522139 __entry->len = len;
21532140 __entry->clear_bits = clear_bits;
@@ -2176,17 +2163,12 @@ TRACE_EVENT(btrfs_convert_extent_bit, · 22 unmodified lines
21762163 __field( unsigned, clear_bits)
21772164 ),
21782165
2179− TP_fast_assign_btrfs(tree->fs_info,
2180− __entry->owner = tree->owner;
2181− if (tree->inode) {
2182− const struct btrfs_inode *inode = tree->inode;
2166+ TP_fast_assign_btrfs(extent_io_tree_to_fs_info(tree),
2167+ const struct btrfs_inode *inode = extent_io_tree_to_inode_const(tree);
21832168
2184− __entry->ino = btrfs_ino(inode);
2185− __entry->rootid = inode->root->root_key.objectid;
2186− } else {
2187− __entry->ino = 0;
2188− __entry->rootid = 0;
2189− }
2169+ __entry->owner = tree->owner;
2170+ __entry->ino = inode ? btrfs_ino(inode) : 0;
2171+ __entry->rootid = inode ? inode->root->root_key.objectid : 0;
21902172 __entry->start = start;
21912173 __entry->len = len;
21922174 __entry->set_bits = set_bits;