Skip to content

btrfs: add trace events for fsync and inode logging

[email protected] linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest28 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/28btrfs: tracepoints: remove double negation in finish ordered extent eventinclude/trace/events/btrfs.h+1 -10 replies
2/28btrfs: tracepoints: remove pointless root field from transaction commit eventinclude/trace/events/btrfs.h+1 -50 replies
3/28btrfs: remove call to transaction commit trace in warn_about_uncommitted_trans()fs/btrfs/disk-io.c+0 -10 replies
4/28btrfs: remove call to transaction commit trace in btrfs_cleanup_transaction()fs/btrfs/disk-io.c+0 -10 replies
5/28btrfs: tracepoints: pass a transaction handle to transaction commit eventfs/btrfs/transaction.c include/trace/events/btrfs.h+7 -60 replies
6/28btrfs: tracepoints: add in_fsync field to transaction commit eventinclude/trace/events/btrfs.h+4 -10 replies
7/28btrfs: tracepoints: add trace event for transaction abortsfs/btrfs/transaction.c include/trace/events/btrfs.h+23 -00 replies
8/28btrfs: tracepoints: add trace event for the start of a new transactionfs/btrfs/transaction.c include/trace/events/btrfs.h+19 -00 replies
9/28btrfs: tracepoints: trace transaction states during commit phasefs/btrfs/transaction.c include/trace/events/btrfs.h+21 -40 replies
10/28btrfs: stop checking for greater then zero return values in btrfs_sync_file()fs/btrfs/file.c+2 -10 replies
11/28btrfs: remove redundant writeback error check during fsyncfs/btrfs/file.c+4 -80 replies
12/28btrfs: tracepoints: add trace event for when fsync finishesfs/btrfs/file.c include/trace/events/btrfs.h+30 -20 replies
13/28btrfs: tracepoints: add trace event for btrfs_log_inode_parent()fs/btrfs/tree-log.c include/trace/events/btrfs.h+107 -90 replies
14/28btrfs: use a named enum for the log mode in inode log functionsfs/btrfs/tree-log.c fs/btrfs/tree-log.h+32 -370 replies
15/28btrfs: tracepoints: add trace event for btrfs_log_inode()fs/btrfs/super.c fs/btrfs/tree-log.c include/trace/events/btrfs.h+128 -51 reply
16/28btrfs: tracepoints: add trace event for btrfs_log_all_parents()fs/btrfs/tree-log.c include/trace/events/btrfs.h+73 -90 replies
17/28btrfs: tracepoints: add trace event for log_all_new_ancestors()fs/btrfs/tree-log.c include/trace/events/btrfs.h+78 -110 replies
18/28btrfs: tracepoints: add trace event for log_new_dir_dentries()fs/btrfs/tree-log.c include/trace/events/btrfs.h+61 -20 replies
19/28btrfs: tracepoints: add trace event for add_conflicting_inode()fs/btrfs/tree-log.c include/trace/events/btrfs.h+92 -134 replies
20/28btrfs: tracepoints: add trace event for log_conflicting_inodes()fs/btrfs/tree-log.c include/trace/events/btrfs.h+62 -00 replies
21/28btrfs: use simple assertions where enough during inode logging and replayfs/btrfs/tree-log.c+2 -30 replies
22/28btrfs: tracepoints: add trace event for log_new_delayed_dentries()fs/btrfs/tree-log.c include/trace/events/btrfs.h+63 -00 replies
23/28btrfs: tracepoints: add trace event for btrfs_record_unlink_dir()fs/btrfs/tree-log.c include/trace/events/btrfs.h+33 -00 replies
24/28btrfs: tracepoints: add trace event for btrfs_record_snapshot_destroy()fs/btrfs/tree-log.c include/trace/events/btrfs.h+27 -00 replies
25/28btrfs: tracepoints: add trace event for btrfs_record_new_subvolume()fs/btrfs/tree-log.c include/trace/events/btrfs.h+27 -00 replies
26/28btrfs: tracepoints: add trace event for btrfs_log_new_name()fs/btrfs/tree-log.c include/trace/events/btrfs.h+71 -20 replies
27/28btrfs: tracepoints: add trace event for btrfs_sync_log()fs/btrfs/tree-log.c include/trace/events/btrfs.h+100 -00 replies
28/28btrfs: tracepoints: show inode type in btrfs_sync_file_enter() eventinclude/trace/events/btrfs.h+10 -90 replies

Reviews trailers per patch

None of the 28 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJohannes Thumshirn
SeriesR-b
1/28
2/28
3/28
4/28
5/28
6/28
7/28
8/28
9/28
10/28
11/28
12/28
13/28
14/28
15/28
16/28
17/28
18/28
19/28
20/28
21/28
22/28
23/28
24/28
25/28
26/28
27/28
28/28

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/28] btrfs: add trace events for fsync and inode logging

From: Filipe Manana <[email protected]>

We don't have any useful tracing events for fsync and inode logging operations (which also happen during rename and link), except for a tracing event triggered when we enter an fsync, but that alone is useless to debug fsync bugs.

This patch set adds several trace events and improve a couple existing ones in order to debug fsync related issues. These are based on most of the custom trace_printk() code I have used over the years and were useful to debug bugs.

A few cleanups are also included in here.

More details in the individual change logs.

Filipe Manana (28):
btrfs: tracepoints: remove double negation in finish ordered extent event
btrfs: tracepoints: remove pointless root field from transaction commit event
btrfs: remove call to transaction commit trace in warn_about_uncommitted_trans()
btrfs: remove call to transaction commit trace in btrfs_cleanup_transaction()
btrfs: tracepoints: pass a transaction handle to transaction commit event
btrfs: tracepoints: add in_fsync field to transaction commit event
btrfs: tracepoints: add trace event for transaction aborts
btrfs: tracepoints: add trace event for the start of a new transaction
btrfs: tracepoints: trace transaction states during commit phase
btrfs: stop checking for greater then zero return values in btrfs_sync_file()
btrfs: remove redundant writeback error check during fsync
btrfs: tracepoints: add trace event for when fsync finishes
btrfs: tracepoints: add trace event for btrfs_log_inode_parent()
btrfs: use a named enum for the log mode in inode log functions
btrfs: tracepoints: add trace event for btrfs_log_inode()
btrfs: tracepoints: add trace event for btrfs_log_all_parents()
btrfs: tracepoints: add trace event for log_all_new_ancestors()
btrfs: tracepoints: add trace event for log_new_dir_dentries()
btrfs: tracepoints: add trace event for add_conflicting_inode()
btrfs: tracepoints: add trace event for log_conflicting_inodes()
btrfs: use simple assertions where enough during inode logging and replay
btrfs: tracepoints: add trace event for log_new_delayed_dentries()
btrfs: tracepoints: add trace event for btrfs_record_unlink_dir()
btrfs: tracepoints: add trace event for btrfs_record_snapshot_destroy()
btrfs: tracepoints: add trace event for btrfs_record_new_subvolume()
btrfs: tracepoints: add trace event for btrfs_log_new_name()
btrfs: tracepoints: add trace event for btrfs_sync_log()
btrfs: tracepoints: show inode type in btrfs_sync_file_enter() event

 fs/btrfs/disk-io.c           |   2 -
 fs/btrfs/file.c              |  19 +-
 fs/btrfs/super.c             |   1 +
 fs/btrfs/transaction.c       |  12 +-
 fs/btrfs/tree-log.c          | 273 +++++++----
 fs/btrfs/tree-log.h          |   7 +
 include/trace/events/btrfs.h | 886 ++++++++++++++++++++++++++++++++++-
 7 files changed, 1074 insertions(+), 126 deletions(-)
Signature · 1 line
2.47.2