On 2024/7/4 11:37, Matthew Wilcox wrote:
On Thu, Jul 04, 2024 at 11:07:03AM +0800, Hongbo Li wrote:
+ TP_printk("dev = (%d,%d), ino = %lu, dir = %lu, mode = 0%o",
+ MAJOR(__entry->dev), MINOR(__entry->dev),
+ (unsigned long) __entry->ino,
+ (unsigned long) __entry->dir, __entry->mode)
erofs and f2fs are the only two places that print devices like this.
"dev=%d:%d inode=%lx"
Why do we need dir and mode?
Thanks for reviewing!
Here dir and mode are used to track the creation of the directory tree.
Actually, why do we need a tracepoint on alloc_inode at all? What
does it help us debug, and why does no other filesystem need an
alloc_inode tracepoint?
In fact, f2fs and ext4 have added this tracepoint such as
trace_f2fs_new_inode(in f2fs) and trace_ext4_allocate_inode(in ext4).
This can trace the lifecycle of an inode comprehensively. These
tracepoints are used to debug some closed application scenarios, and
also helping developers to debug the filesystem logic in hugetlbfs.
Thanks,
Hongbo