linux/fs/btrfs
Linus Torvalds cb30bf881c tracing updates for v7.1:
- Fix printf format warning for bprintf
 
   sunrpc uses a trace_printk() that triggers a printf warning during the
   compile. Move the __printf() attribute around for when debugging is not
   enabled the warning will go away.
 
 - Remove redundant check for EVENT_FILE_FL_FREED in event_filter_write()
 
   The FREED flag is checked in the call to event_file_file() and then
   checked again right afterward, which is unneeded.
 
 - Clean up event_file_file() and event_file_data() helpers
 
   These helper functions played a different role in the past, but now with
   eventfs, the READ_ONCE() isn't needed. Simplify the code a bit and also
   add a warning to event_file_data() if the file or its data is not present.
 
 - Remove updating file->private_data in tracing open
 
   All access to the file private data is handled by the helper functions,
   which do not use file->private_data. Stop updating it on open.
 
 - Show ENUM names in function arguments via BTF in function tracing
 
   When showing the function arguments when func-args option is set for
   function tracing, if one of the arguments is found to be an enum, show the
   name of the enum instead of its number.
 
 - Add new trace_call__##name() API for tracepoints
 
   Tracepoints are enabled via static_branch() blocks, where when not
   enabled, there's only a nop that is in the code where the execution will
   just skip over it. When tracing is enabled, the nop is converted to a
   direct jump to the tracepoint code. Sometimes more calculations are
   required to be performed to update the parameters of the tracepoint. In
   this case, trace_##name##_enabled() is called which is a static_branch()
   that gets enabled only when the tracepoint is enabled. This allows the
   extra calculations to also be skipped by the nop:
 
   if (trace_foo_enabled()) {
       x = bar();
       trace_foo(x);
   }
 
   Where the x=bar() is only performed when foo is enabled. The problem with
   this approach is that there's now two static_branch() calls. One for
   checking if the tracepoint is enabled, and then again to know if the
   tracepoint should be called. The second one is redundant.
 
   Introduce trace_call__foo() that will call the foo() tracepoint directly
   without doing a static_branch():
 
   if (trace_foo_enabled()) {
       x = bar();
       trace_call__foo();
   }
 
 - Update various locations to use the new trace_call__##name() API
 
 - Move snapshot code out of trace.c
 
   Cleaning up trace.c to not be a "dump all", move the snapshot code out of
   it and into a new trace_snapshot.c file.
 
 - Clean up some "%*.s" to "%*s"
 
 - Allow boot kernel command line options to be called multiple times
 
   Have options like:
 
     ftrace_filter=foo ftrace_filter=bar ftrace_filter=zoo
 
   Equal to:
 
     ftrace_filter=foo,bar,zoo
 
 - Fix ipi_raise event CPU field to be a CPU field
 
   The ipi_raise target_cpus field is defined as a __bitmask(). There is now a
   __cpumask() field definition. Update the field to use that.
 
 - Have hist_field_name() use a snprintf() and not a series of strcat()
 
   It's safer to use snprintf() that a series of strcat().
 
 - Fix tracepoint regfunc balancing
 
   A tracepoint can define a "reg" and "unreg" function that gets called
   before the tracepoint is enabled, and after it is disabled respectively.
   But on error, after the "reg" func is called and the tracepoint is not
   enabled, the "unreg" function is not called to tear down what the "reg"
   function performed.
 
 - Fix output that shows what histograms are enabled
 
   Event variables are displayed incorrectly in the histogram output.
 
   Instead of "sched.sched_wakeup.$var", it is showing
   "$sched.sched_wakeup.var" where the '$' is in the incorrect location.
 
 - Some other simple cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYKADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCaeCpvxQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qt2WAP44m85BbAjBqJe4WR103eOXV+bREBta
 dRoReKJOMe519gEAp0rK/HoCvHgHhIGe3gaGdIsNhnaxoFyNWMG/wokoLAY=
 =Hg6+
 -----END PGP SIGNATURE-----

Merge tag 'trace-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing updates from Steven Rostedt:

 - Fix printf format warning for bprintf

   sunrpc uses a trace_printk() that triggers a printf warning during
   the compile. Move the __printf() attribute around for when debugging
   is not enabled the warning will go away

 - Remove redundant check for EVENT_FILE_FL_FREED in
   event_filter_write()

   The FREED flag is checked in the call to event_file_file() and then
   checked again right afterward, which is unneeded

 - Clean up event_file_file() and event_file_data() helpers

   These helper functions played a different role in the past, but now
   with eventfs, the READ_ONCE() isn't needed. Simplify the code a bit
   and also add a warning to event_file_data() if the file or its data
   is not present

 - Remove updating file->private_data in tracing open

   All access to the file private data is handled by the helper
   functions, which do not use file->private_data. Stop updating it on
   open

 - Show ENUM names in function arguments via BTF in function tracing

   When showing the function arguments when func-args option is set for
   function tracing, if one of the arguments is found to be an enum,
   show the name of the enum instead of its number

 - Add new trace_call__##name() API for tracepoints

   Tracepoints are enabled via static_branch() blocks, where when not
   enabled, there's only a nop that is in the code where the execution
   will just skip over it. When tracing is enabled, the nop is converted
   to a direct jump to the tracepoint code. Sometimes more calculations
   are required to be performed to update the parameters of the
   tracepoint. In this case, trace_##name##_enabled() is called which is
   a static_branch() that gets enabled only when the tracepoint is
   enabled. This allows the extra calculations to also be skipped by the
   nop:

	if (trace_foo_enabled()) {
		x = bar();
		trace_foo(x);
	}

   Where the x=bar() is only performed when foo is enabled. The problem
   with this approach is that there's now two static_branch() calls. One
   for checking if the tracepoint is enabled, and then again to know if
   the tracepoint should be called. The second one is redundant

   Introduce trace_call__foo() that will call the foo() tracepoint
   directly without doing a static_branch():

	if (trace_foo_enabled()) {
		x = bar();
		trace_call__foo();
	}

 - Update various locations to use the new trace_call__##name() API

 - Move snapshot code out of trace.c

   Cleaning up trace.c to not be a "dump all", move the snapshot code
   out of it and into a new trace_snapshot.c file

 - Clean up some "%*.s" to "%*s"

 - Allow boot kernel command line options to be called multiple times

   Have options like:

	ftrace_filter=foo ftrace_filter=bar ftrace_filter=zoo

   Equal to:

	ftrace_filter=foo,bar,zoo

 - Fix ipi_raise event CPU field to be a CPU field

   The ipi_raise target_cpus field is defined as a __bitmask(). There is
   now a __cpumask() field definition. Update the field to use that

 - Have hist_field_name() use a snprintf() and not a series of strcat()

   It's safer to use snprintf() that a series of strcat()

 - Fix tracepoint regfunc balancing

   A tracepoint can define a "reg" and "unreg" function that gets called
   before the tracepoint is enabled, and after it is disabled
   respectively. But on error, after the "reg" func is called and the
   tracepoint is not enabled, the "unreg" function is not called to tear
   down what the "reg" function performed

 - Fix output that shows what histograms are enabled

   Event variables are displayed incorrectly in the histogram output

   Instead of "sched.sched_wakeup.$var", it is showing
   "$sched.sched_wakeup.var" where the '$' is in the incorrect location

 - Some other simple cleanups

* tag 'trace-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (24 commits)
  selftests/ftrace: Add test case for fully-qualified variable references
  tracing: Fix fully-qualified variable reference printing in histograms
  tracepoint: balance regfunc() on func_add() failure in tracepoint_add_func()
  tracing: Rebuild full_name on each hist_field_name() call
  tracing: Report ipi_raise target CPUs as cpumask
  tracing: Remove duplicate latency_fsnotify() stub
  tracing: Preserve repeated trace_trigger boot parameters
  tracing: Append repeated boot-time tracing parameters
  tracing: Remove spurious default precision from show_event_trigger/filter formats
  cpufreq: Use trace_call__##name() at guarded tracepoint call sites
  tracing: Remove tracing_alloc_snapshot() when snapshot isn't defined
  tracing: Move snapshot code out of trace.c and into trace_snapshot.c
  mm: damon: Use trace_call__##name() at guarded tracepoint call sites
  btrfs: Use trace_call__##name() at guarded tracepoint call sites
  spi: Use trace_call__##name() at guarded tracepoint call sites
  i2c: Use trace_call__##name() at guarded tracepoint call sites
  kernel: Use trace_call__##name() at guarded tracepoint call sites
  tracepoint: Add trace_call__##name() API
  tracing: trace_mmap.h: fix a kernel-doc warning
  tracing: Pretty-print enum parameters in function arguments
  ...
2026-04-17 09:43:12 -07:00
..
tests mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
accessors.c btrfs: fix typos in comments and strings 2025-09-23 08:49:16 +02:00
accessors.h btrfs: allow mounting filesystems with remap-tree incompat flag 2026-02-03 07:54:35 +01:00
acl.c posix_acl: make posix_acl_to_xattr() alloc the buffer 2026-01-16 10:51:12 +01:00
acl.h btrfs: update include and forward declarations in headers 2025-03-18 20:35:43 +01:00
async-thread.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
async-thread.h
backref.c btrfs: remove redundant extent_buffer_uptodate() checks after read_tree_block() 2026-04-07 18:55:55 +02:00
backref.h btrfs: declare free_ipath() via DEFINE_FREE() 2025-11-24 22:34:51 +01:00
bio.c btrfs: btrfs_log_dev_io_error() on all bio errors 2026-04-07 20:00:29 +02:00
bio.h btrfs: move existing remaps before relocating block group 2026-02-03 07:54:35 +01:00
block-group.c btrfs: replace BUG_ON() with error return in cache_save_setup() 2026-04-07 18:56:08 +02:00
block-group.h btrfs: zoned: limit number of zones reclaimed in flush_space() 2026-04-07 18:56:01 +02:00
block-rsv.c btrfs: don't allow log trees to consume global reserve or overcommit metadata 2026-04-07 18:55:53 +02:00
block-rsv.h btrfs: add METADATA_REMAP chunk type 2026-02-03 07:54:27 +01:00
btrfs_inode.h fsverity: use a hashtable to find the fsverity_info 2026-02-04 11:31:54 -08:00
compression.c mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
compression.h btrfs: prevent direct reclaim during compressed readahead 2026-04-07 18:56:08 +02:00
ctree.c btrfs: rename local variable for offset in folio 2026-04-07 18:56:07 +02:00
ctree.h btrfs: introduce BTRFS_PATH_AUTO_RELEASE() helper 2026-02-03 06:38:32 +01:00
defrag.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
defrag.h btrfs: pass struct btrfs_inode to btrfs_defrag_file() 2025-03-18 20:35:43 +01:00
delalloc-space.c btrfs: remove fs_info argument from btrfs_reserve_metadata_bytes() 2025-11-24 21:59:11 +01:00
delalloc-space.h btrfs: pass struct btrfs_inode to btrfs_free_reserved_data_space_noquota() 2025-05-15 14:30:52 +02:00
delayed-inode.c btrfs: unexport btrfs_qgroup_reserve_meta() 2026-04-07 18:56:05 +02:00
delayed-inode.h btrfs: embed delayed root to struct btrfs_fs_info 2026-02-03 07:56:20 +01:00
delayed-ref.c btrfs: zoned: cap delayed refs metadata reservation to avoid overcommit 2026-04-07 18:55:55 +02:00
delayed-ref.h btrfs: move ref-verify under CONFIG_BTRFS_DEBUG 2025-09-22 10:54:32 +02:00
dev-replace.c btrfs: pass literal booleans to functions that take boolean arguments 2026-04-07 18:55:56 +02:00
dev-replace.h btrfs: trivial conversion to return bool instead of int 2025-05-15 14:30:49 +02:00
dir-item.c btrfs: remove pointless error check in btrfs_check_dir_item_collision() 2026-04-07 18:56:00 +02:00
dir-item.h btrfs: rename inode number parameter passed to btrfs_check_dir_item_collision() 2025-07-22 00:05:00 +02:00
direct-io.c btrfs: remove redundant nowait check in lock_extent_direct() 2026-04-07 18:55:58 +02:00
direct-io.h btrfs: update include and forward declarations in headers 2025-03-18 20:35:43 +01:00
discard.c btrfs: handle discarding fully-remapped block groups 2026-02-03 07:54:36 +01:00
discard.h btrfs: update include and forward declarations in headers 2025-03-18 20:35:43 +01:00
disk-io.c btrfs: use BTRFS_FS_UPDATE_UUID_TREE_GEN flag for UUID tree rescan check 2026-04-07 19:43:06 +02:00
disk-io.h btrfs: remove atomic parameter from btrfs_buffer_uptodate() 2026-04-07 18:56:02 +02:00
export.c btrfs: avoid potential out-of-bounds in btrfs_encode_fh() 2025-09-26 08:48:30 +02:00
export.h
extent_io.c mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
extent_io.h btrfs: avoid GFP_ATOMIC allocations in qgroup free paths 2026-04-07 18:56:05 +02:00
extent_map.c btrfs: Use trace_call__##name() at guarded tracepoint call sites 2026-03-26 10:24:40 -04:00
extent_map.h btrfs: headers cleanup to remove unnecessary local includes 2025-11-24 22:34:52 +01:00
extent-io-tree.c btrfs: avoid GFP_ATOMIC allocations in qgroup free paths 2026-04-07 18:56:05 +02:00
extent-io-tree.h btrfs: convert several int parameters to bool 2025-09-22 10:54:32 +02:00
extent-tree.c btrfs: decrease indentation of find_free_extent_update_loop 2026-04-07 18:56:05 +02:00
extent-tree.h btrfs: add do_remap parameter to btrfs_discard_extent() 2026-02-03 07:54:35 +01:00
fiemap.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
fiemap.h
file-item.c btrfs: rename btrfs_csum_file_blocks() to btrfs_insert_data_csums() 2026-04-07 18:55:56 +02:00
file-item.h btrfs: rename btrfs_csum_file_blocks() to btrfs_insert_data_csums() 2026-04-07 18:55:56 +02:00
file.c btrfs: tag as unlikely if statements that check for fs in error state 2026-04-07 19:41:42 +02:00
file.h btrfs: update include and forward declarations in headers 2025-03-18 20:35:43 +01:00
free-space-cache.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
free-space-cache.h btrfs: handle discarding fully-remapped block groups 2026-02-03 07:54:36 +01:00
free-space-tree.c btrfs: check for NULL root after calls to btrfs_extent_root() 2026-03-17 11:22:49 +01:00
free-space-tree.h btrfs: handle setting up relocation of block group with remap-tree 2026-02-03 07:54:35 +01:00
fs.c btrfs: switch to library APIs for checksums 2026-02-03 06:38:32 +01:00
fs.h btrfs: report filesystem shutdown via fserror 2026-04-07 18:55:59 +02:00
inode-item.c btrfs: merge setting ret and return ret 2026-02-03 06:38:33 +01:00
inode-item.h btrfs: remove unused parameters from btrfs_lookup_inode_extref() 2025-07-21 23:58:03 +02:00
inode.c btrfs: skip clearing EXTENT_DEFRAG for NOCOW ordered extents 2026-04-07 19:43:22 +02:00
ioctl.c btrfs: fix btrfs_ioctl_space_info() slot_count TOCTOU which can lead to info-leak 2026-04-07 18:56:05 +02:00
ioctl.h tree-wide: s/struct fileattr/struct file_kattr/g 2025-07-04 16:14:39 +02:00
Kconfig btrfs: move shutdown and remove_bdev callbacks out of experimental features 2026-04-07 18:56:05 +02:00
locking.c btrfs: add definitions and constants for remap-tree 2026-02-03 07:54:02 +01:00
locking.h btrfs: fix typos in comments and strings 2025-09-23 08:49:16 +02:00
lru_cache.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
lru_cache.h
lzo.c btrfs: prevent direct reclaim during compressed readahead 2026-04-07 18:56:08 +02:00
Makefile btrfs: tests: zoned: add tests cases for zoned code 2026-04-07 18:55:52 +02:00
messages.c btrfs: tag as unlikely if statements that check for fs in error state 2026-04-07 19:41:42 +02:00
messages.h btrfs: stop printing condition result in assertion failure messages 2026-04-07 18:55:58 +02:00
misc.h btrfs: introduce a common helper to calculate the size of a bio 2026-04-07 18:55:59 +02:00
ordered-data.c btrfs: fix silent IO error loss in encoded writes and zoned split 2026-04-07 19:43:50 +02:00
ordered-data.h btrfs: check type flags in alloc_ordered_extent() 2026-04-07 18:56:02 +02:00
orphan.c
orphan.h
print-tree.c btrfs: remove redundant extent_buffer_uptodate() checks after read_tree_block() 2026-04-07 18:55:55 +02:00
print-tree.h btrfs: update include and forward declarations in headers 2025-03-18 20:35:43 +01:00
props.c btrfs: props: switch prop_handler::extract to struct btrfs_inode 2025-03-18 20:35:44 +01:00
props.h btrfs: pass struct btrfs_inode to btrfs_inode_inherit_props() 2025-03-18 20:35:44 +01:00
qgroup.c btrfs: avoid GFP_ATOMIC allocations in qgroup free paths 2026-04-07 18:56:05 +02:00
qgroup.h btrfs: unexport btrfs_qgroup_reserve_meta() 2026-04-07 18:56:05 +02:00
raid-stripe-tree.c btrfs: fix placement of unlikely() in btrfs_insert_one_raid_extent() 2026-04-07 18:55:58 +02:00
raid-stripe-tree.h btrfs: update include and forward declarations in headers 2025-03-18 20:35:43 +01:00
raid56.c tracing updates for v7.1: 2026-04-17 09:43:12 -07:00
raid56.h btrfs: raid56: introduce a new parameter to locate a sector 2025-11-25 01:46:58 +01:00
ref-verify.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
ref-verify.h btrfs: move ref-verify under CONFIG_BTRFS_DEBUG 2025-09-22 10:54:32 +02:00
reflink.c btrfs: fix deadlock between reflink and transaction commit when using flushoncommit 2026-04-07 18:56:06 +02:00
reflink.h
relocation.c btrfs: avoid starting new transaction and commit in relocate_block_group() 2026-04-07 18:55:55 +02:00
relocation.h btrfs: handle setting up relocation of block group with remap-tree 2026-02-03 07:54:35 +01:00
root-tree.c btrfs: fix lost error return in btrfs_find_orphan_roots() 2026-02-18 15:25:54 +01:00
root-tree.h
scrub.c btrfs: tag as unlikely if statements that check for fs in error state 2026-04-07 19:41:42 +02:00
scrub.h btrfs: convert several int parameters to bool 2025-09-22 10:54:32 +02:00
send.c btrfs: pass literal booleans to functions that take boolean arguments 2026-04-07 18:55:56 +02:00
send.h btrfs: pass btrfs_root pointers to send ioctl parameters 2025-03-18 20:35:49 +01:00
space-info.c btrfs: fix double free in create_space_info() error path 2026-04-07 18:56:09 +02:00
space-info.h btrfs: constify arguments of some functions 2026-04-07 18:55:58 +02:00
subpage.c for-6.19-tag 2025-12-03 20:03:46 -08:00
subpage.h btrfs: headers cleanup to remove unnecessary local includes 2025-11-24 22:34:52 +01:00
super.c btrfs: tag as unlikely if statements that check for fs in error state 2026-04-07 19:41:42 +02:00
super.h btrfs: constify arguments of some functions 2026-04-07 18:55:58 +02:00
sysfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sysfs.h btrfs: remove fs_info argument from btrfs_sysfs_add_space_info_type() 2025-11-24 22:02:30 +01:00
transaction.c btrfs: remove duplicate journal_info reset on failure to commit transaction 2026-04-07 19:42:24 +02:00
transaction.h btrfs: inhibit extent buffer writeback to prevent COW amplification 2026-04-07 18:56:00 +02:00
tree-checker.c btrfs: tree-checker: add remap-tree checks to check_block_group_item() 2026-04-07 18:56:06 +02:00
tree-checker.h btrfs: add definitions and constants for remap-tree 2026-02-03 07:54:02 +01:00
tree-log.c btrfs: tag as unlikely if statements that check for fs in error state 2026-04-07 19:41:42 +02:00
tree-log.h btrfs: make btrfs_free_log() and btrfs_free_log_root_tree() return void 2026-04-07 18:56:06 +02:00
tree-mod-log.c btrfs: remove redundant extent_buffer_uptodate() checks after read_tree_block() 2026-04-07 18:55:55 +02:00
tree-mod-log.h
ulist.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
ulist.h
uuid-tree.c btrfs: prefer IS_ERR_OR_NULL() over manual NULL check 2026-04-07 18:56:02 +02:00
uuid-tree.h btrfs: fix transaction abort on set received ioctl due to item overflow 2026-03-03 17:03:59 +01:00
verity.c for-7.0-rc1-tag 2026-02-20 14:57:09 -08:00
verity.h
volumes.c for-7.1-tag 2026-04-13 16:35:32 -07:00
volumes.h btrfs: introduce the device layout aware per-profile available space 2026-04-07 18:55:53 +02:00
xattr.c btrfs: remaining BTRFS_PATH_AUTO_FREE conversions 2025-11-25 01:53:33 +01:00
xattr.h btrfs: update include and forward declarations in headers 2025-03-18 20:35:43 +01:00
zlib.c btrfs: prevent direct reclaim during compressed readahead 2026-04-07 18:56:08 +02:00
zoned.c btrfs: fix silent IO error loss in encoded writes and zoned split 2026-04-07 19:43:50 +02:00
zoned.h btrfs: zoned: factor out the zone loading part into a testable function 2026-02-03 07:59:06 +01:00
zstd.c btrfs: prevent direct reclaim during compressed readahead 2026-04-07 18:56:08 +02:00