diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-05-07 13:03:13 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-05-24 03:01:09 +0200 |
| commit | 023332ec58af6ade2552eacf4ca7807750c667ae (patch) | |
| tree | ddb2e3313b3e5492e36ac7c73b7fe81c61725378 /fs | |
| parent | fd4ad5058b3a10d43105d6f45b905273cf226359 (diff) | |
| download | linux-next-history-023332ec58af6ade2552eacf4ca7807750c667ae.tar.gz | |
btrfs: tracepoints: add trace event for log_conflicting_inodes()
log_conflicting_inodes() 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.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 8e2a2b8982d7a..dab1452dc4d16 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -6262,7 +6262,15 @@ static int log_conflicting_inodes(struct btrfs_trans_handle *trans, if (ctx->logging_conflict_inodes) return 0; + /* + * Avoid any work if no conflicting inodes and emitting the trace event + * which only adds noise and it's useless if there are no inodes. + */ + if (list_empty(&ctx->conflict_inodes)) + return 0; + ctx->logging_conflict_inodes = true; + trace_btrfs_log_conflicting_inodes_enter(trans, ctx); /* * New conflicting inodes may be found and added to the list while we @@ -6356,6 +6364,7 @@ static int log_conflicting_inodes(struct btrfs_trans_handle *trans, ctx->logging_conflict_inodes = false; if (ret) free_conflicting_inodes(ctx); + trace_btrfs_log_conflicting_inodes_exit(trans, ctx, ret); return ret; } |
