[PATCH v3 07/12] hugetlbfs: widen trace event i_ino fields to u64

Jeff Layton
2026-03-04T15:34:59Z

Update hugetlbfs trace event definitions to use u64 instead of
ino_t/unsigned long for inode number fields.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
include/trace/events/hugetlbfs.h | 42 ++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/include/trace/events/hugetlbfs.h b/include/trace/events/hugetlbfs.h
index 59605dfaeeb43d9e7657e338fdbe740e8486a286..8ba72c1d4f4d8ba616906be5b5c4b487972fec00 100644
--- a/include/trace/events/hugetlbfs.h
+++ b/include/trace/events/hugetlbfs.h
@@ -14,9 +14,9 @@ TRACE_EVENT(hugetlbfs_alloc_inode,
TP_ARGS(inode, dir, mode),

TP_STRUCT__entry(
+ __field(u64, ino)
+ __field(u64, dir)
__field(dev_t, dev)
- __field(ino_t, ino)
- __field(ino_t, dir)
__field(__u16, mode)
),

@@ -27,10 +27,10 @@ TRACE_EVENT(hugetlbfs_alloc_inode,
__entry->mode = mode;
),

- TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
+ TP_printk("dev %d,%d ino %llu dir %llu mode 0%o",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
- (unsigned long) __entry->dir, __entry->mode)
+ __entry->ino,
+ __entry->dir, __entry->mode)
);

DECLARE_EVENT_CLASS(hugetlbfs__inode,
@@ -40,13 +40,13 @@ DECLARE_EVENT_CLASS(hugetlbfs__inode,
TP_ARGS(inode),

TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(__u16, mode)
+ __field(u64, ino)
__field(loff_t, size)
+ __field(blkcnt_t, blocks)
+ __field(dev_t, dev)
__field(unsigned int, nlink)
__field(unsigned int, seals)
- __field(blkcnt_t, blocks)
+ __field(__u16, mode)
),

TP_fast_assign(
@@ -59,8 +59,8 @@ DECLARE_EVENT_CLASS(hugetlbfs__inode,
__entry->blocks = inode->i_blocks;
),

- TP_printk("dev %d,%d ino %lu mode 0%o size %lld nlink %u seals %u blocks %llu",
- MAJOR(__entry->dev), MINOR(__entry->dev), (unsigned long) __entry->ino,
+ TP_printk("dev %d,%d ino %llu mode 0%o size %lld nlink %u seals %u blocks %llu",
+ MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
__entry->mode, __entry->size, __entry->nlink, __entry->seals,
(unsigned long long)__entry->blocks)
);
@@ -87,14 +87,14 @@ TRACE_EVENT(hugetlbfs_setattr,
TP_ARGS(inode, dentry, attr),

TP_STRUCT__entry(
+ __field(u64, ino)
+ __field(loff_t, old_size)
+ __field(loff_t, ia_size)
__field(dev_t, dev)
- __field(ino_t, ino)
__field(unsigned int, d_len)
__string(d_name, dentry->d_name.name)
__field(unsigned int, ia_valid)
__field(unsigned int, ia_mode)
- __field(loff_t, old_size)
- __field(loff_t, ia_size)
),

TP_fast_assign(
@@ -108,8 +108,8 @@ TRACE_EVENT(hugetlbfs_setattr,
__entry->ia_size = attr->ia_size;
),

- TP_printk("dev %d,%d ino %lu name %.*s valid %#x mode 0%o old_size %lld size %lld",
- MAJOR(__entry->dev), MINOR(__entry->dev), (unsigned long)__entry->ino,
+ TP_printk("dev %d,%d ino %llu name %.*s valid %#x mode 0%o old_size %lld size %lld",
+ MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
__entry->d_len, __get_str(d_name), __entry->ia_valid, __entry->ia_mode,
__entry->old_size, __entry->ia_size)
);
@@ -122,12 +122,12 @@ TRACE_EVENT(hugetlbfs_fallocate,
TP_ARGS(inode, mode, offset, len, ret),

TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(int, mode)
+ __field(u64, ino)
__field(loff_t, offset)
__field(loff_t, len)
__field(loff_t, size)
+ __field(dev_t, dev)
+ __field(int, mode)
__field(int, ret)
),

@@ -141,9 +141,9 @@ TRACE_EVENT(hugetlbfs_fallocate,
__entry->ret = ret;
),

- TP_printk("dev %d,%d ino %lu mode 0%o offset %lld len %lld size %lld ret %d",
+ TP_printk("dev %d,%d ino %llu mode 0%o offset %lld len %lld size %lld ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long)__entry->ino, __entry->mode,
+ __entry->ino, __entry->mode,
(unsigned long long)__entry->offset,
(unsigned long long)__entry->len,
(unsigned long long)__entry->size,

--
2.53.0