summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-07-01 05:37:39 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-07-01 05:37:39 +0300
commita6ecc2a491e378e00e65e59a006d4005e1c2f4af (patch)
treec252ded3b08909bbab2a7bde76b60a0b225d3c3a /include/trace
parent2cfa582be80081fb8db02d4d9b44bff34b82ac54 (diff)
parent16aa4c9a1fbe763c147a964cdc1f5be8ed98ed13 (diff)
downloadlinux-a6ecc2a491e378e00e65e59a006d4005e1c2f4af.tar.xz
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 updates from Ted Ts'o: "In addition to bug fixes and cleanups, there are two new features for ext4 in 5.14: - Allow applications to poll on changes to /sys/fs/ext4/*/errors_count - Add the ioctl EXT4_IOC_CHECKPOINT which allows the journal to be checkpointed, truncated and discarded or zero'ed" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (32 commits) jbd2: export jbd2_journal_[un]register_shrinker() ext4: notify sysfs on errors_count value change fs: remove bdev_try_to_free_page callback ext4: remove bdev_try_to_free_page() callback jbd2: simplify journal_clean_one_cp_list() jbd2,ext4: add a shrinker to release checkpointed buffers jbd2: remove redundant buffer io error checks jbd2: don't abort the journal when freeing buffers jbd2: ensure abort the journal if detect IO error when writing original buffer back jbd2: remove the out label in __jbd2_journal_remove_checkpoint() ext4: no need to verify new add extent block jbd2: clean up misleading comments for jbd2_fc_release_bufs ext4: add check to prevent attempting to resize an fs with sparse_super2 ext4: consolidate checks for resize of bigalloc into ext4_resize_begin ext4: remove duplicate definition of ext4_xattr_ibody_inline_set() ext4: fsmap: fix the block/inode bitmap comment ext4: fix comment for s_hash_unsigned ext4: use local variable ei instead of EXT4_I() macro ext4: fix avefreec in find_group_orlov ext4: correct the cache_nr in tracepoint ext4_es_shrink_exit ...
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/jbd2.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h
index d16a32867f3a..a4dfe005983d 100644
--- a/include/trace/events/jbd2.h
+++ b/include/trace/events/jbd2.h
@@ -394,6 +394,107 @@ TRACE_EVENT(jbd2_lock_buffer_stall,
__entry->stall_ms)
);
+DECLARE_EVENT_CLASS(jbd2_journal_shrink,
+
+ TP_PROTO(journal_t *journal, unsigned long nr_to_scan,
+ unsigned long count),
+
+ TP_ARGS(journal, nr_to_scan, count),
+
+ TP_STRUCT__entry(
+ __field(dev_t, dev)
+ __field(unsigned long, nr_to_scan)
+ __field(unsigned long, count)
+ ),
+
+ TP_fast_assign(
+ __entry->dev = journal->j_fs_dev->bd_dev;
+ __entry->nr_to_scan = nr_to_scan;
+ __entry->count = count;
+ ),
+
+ TP_printk("dev %d,%d nr_to_scan %lu count %lu",
+ MAJOR(__entry->dev), MINOR(__entry->dev),
+ __entry->nr_to_scan, __entry->count)
+);
+
+DEFINE_EVENT(jbd2_journal_shrink, jbd2_shrink_count,
+
+ TP_PROTO(journal_t *journal, unsigned long nr_to_scan, unsigned long count),
+
+ TP_ARGS(journal, nr_to_scan, count)
+);
+
+DEFINE_EVENT(jbd2_journal_shrink, jbd2_shrink_scan_enter,
+
+ TP_PROTO(journal_t *journal, unsigned long nr_to_scan, unsigned long count),
+
+ TP_ARGS(journal, nr_to_scan, count)
+);
+
+TRACE_EVENT(jbd2_shrink_scan_exit,
+
+ TP_PROTO(journal_t *journal, unsigned long nr_to_scan,
+ unsigned long nr_shrunk, unsigned long count),
+
+ TP_ARGS(journal, nr_to_scan, nr_shrunk, count),
+
+ TP_STRUCT__entry(
+ __field(dev_t, dev)
+ __field(unsigned long, nr_to_scan)
+ __field(unsigned long, nr_shrunk)
+ __field(unsigned long, count)
+ ),
+
+ TP_fast_assign(
+ __entry->dev = journal->j_fs_dev->bd_dev;
+ __entry->nr_to_scan = nr_to_scan;
+ __entry->nr_shrunk = nr_shrunk;
+ __entry->count = count;
+ ),
+
+ TP_printk("dev %d,%d nr_to_scan %lu nr_shrunk %lu count %lu",
+ MAJOR(__entry->dev), MINOR(__entry->dev),
+ __entry->nr_to_scan, __entry->nr_shrunk,
+ __entry->count)
+);
+
+TRACE_EVENT(jbd2_shrink_checkpoint_list,
+
+ TP_PROTO(journal_t *journal, tid_t first_tid, tid_t tid, tid_t last_tid,
+ unsigned long nr_freed, unsigned long nr_scanned,
+ tid_t next_tid),
+
+ TP_ARGS(journal, first_tid, tid, last_tid, nr_freed,
+ nr_scanned, next_tid),
+
+ TP_STRUCT__entry(
+ __field(dev_t, dev)
+ __field(tid_t, first_tid)
+ __field(tid_t, tid)
+ __field(tid_t, last_tid)
+ __field(unsigned long, nr_freed)
+ __field(unsigned long, nr_scanned)
+ __field(tid_t, next_tid)
+ ),
+
+ TP_fast_assign(
+ __entry->dev = journal->j_fs_dev->bd_dev;
+ __entry->first_tid = first_tid;
+ __entry->tid = tid;
+ __entry->last_tid = last_tid;
+ __entry->nr_freed = nr_freed;
+ __entry->nr_scanned = nr_scanned;
+ __entry->next_tid = next_tid;
+ ),
+
+ TP_printk("dev %d,%d shrink transaction %u-%u(%u) freed %lu "
+ "scanned %lu next transaction %u",
+ MAJOR(__entry->dev), MINOR(__entry->dev),
+ __entry->first_tid, __entry->tid, __entry->last_tid,
+ __entry->nr_freed, __entry->nr_scanned, __entry->next_tid)
+);
+
#endif /* _TRACE_JBD2_H */
/* This part must be outside protection */