aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
authorFilipe Manana <fdmanana@suse.com>2026-05-05 15:59:37 +0100
committerDavid Sterba <dsterba@suse.com>2026-05-24 03:01:08 +0200
commit185dd7279e20c95250e05dddf0fc0a086419b656 (patch)
treec9c19e071b6ec8cf96b61d5c8f05ef1884f8ad79 /fs
parent3917ec65f0f19ae64ab832cceced66e4aeb6a17c (diff)
downloadlinux-next-history-185dd7279e20c95250e05dddf0fc0a086419b656.tar.gz
btrfs: tracepoints: add trace event for log_new_dir_dentries()
log_new_dir_dentries() is an important step called during a fsync, as well as during rename and link operations on inodes that were previously logged. Add trace events for when entering and exiting that function. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/tree-log.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index f34dc9771dab9..44c7d250b8102 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -5902,9 +5902,13 @@ static int log_new_dir_dentries(struct btrfs_trans_handle *trans,
struct btrfs_inode *curr_inode = start_inode;
int ret = 0;
+ trace_btrfs_log_new_dir_dentries_enter(trans, start_inode);
+
path = btrfs_alloc_path();
- if (!path)
- return -ENOMEM;
+ if (!path) {
+ ret = -ENOMEM;
+ goto out;
+ }
/* Pairs with btrfs_add_delayed_iput below. */
ihold(&curr_inode->vfs_inode);
@@ -6023,6 +6027,8 @@ out:
kfree(dir_elem);
}
+ trace_btrfs_log_new_dir_dentries_exit(trans, start_inode, ret);
+
return ret;
}