* [PATCH 05/61] jbd2: update format strings for u64 i_ino
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Update %lu to %llu in jbd2 debug/warning messages that print i_ino,
since i_ino is now u64.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/jbd2/journal.c | 4 ++--
fs/jbd2/transaction.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index cb2c529a8f1bea33df6d4135e5782b9a77792732..dcb38453fcda1ea666db5c692dc48f90a40e0d7d 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1677,7 +1677,7 @@ journal_t *jbd2_journal_init_inode(struct inode *inode)
return err ? ERR_PTR(err) : ERR_PTR(-EINVAL);
}
- jbd2_debug(1, "JBD2: inode %s/%ld, size %lld, bits %d, blksize %ld\n",
+ jbd2_debug(1, "JBD2: inode %s/%lld, size %lld, bits %d, blksize %ld\n",
inode->i_sb->s_id, inode->i_ino, (long long) inode->i_size,
inode->i_sb->s_blocksize_bits, inode->i_sb->s_blocksize);
@@ -1689,7 +1689,7 @@ journal_t *jbd2_journal_init_inode(struct inode *inode)
journal->j_inode = inode;
snprintf(journal->j_devname, sizeof(journal->j_devname),
- "%pg-%lu", journal->j_dev, journal->j_inode->i_ino);
+ "%pg-%llu", journal->j_dev, journal->j_inode->i_ino);
strreplace(journal->j_devname, '/', '!');
jbd2_stats_proc_init(journal);
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index dca4b5d8aaaa3e1505b09fab42eb45bb201a8db8..a90f9092706cceea56c1100f7d40ccba0d50adba 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -2651,7 +2651,7 @@ static int jbd2_journal_file_inode(handle_t *handle, struct jbd2_inode *jinode,
return -EROFS;
journal = transaction->t_journal;
- jbd2_debug(4, "Adding inode %lu, tid:%d\n", jinode->i_vfs_inode->i_ino,
+ jbd2_debug(4, "Adding inode %llu, tid:%d\n", jinode->i_vfs_inode->i_ino,
transaction->t_tid);
spin_lock(&journal->j_list_lock);
--
2.53.0
^ permalink raw reply related
* [PATCH 04/61] ext4: update for u64 i_ino
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Update ext4 trace events and filesystem code for u64 i_ino:
- Change __field(ino_t, ...) to __field(u64, ...) in trace events
- Update all %lu format strings to %llu for inode numbers
- Cast to (unsigned long long) where needed in TP_printk
- Update __ext4_grp_locked_error() ino parameter to u64
- Update ext_debug() format string
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/ext4/dir.c | 2 +-
fs/ext4/ext4.h | 4 +-
fs/ext4/extents.c | 8 +-
fs/ext4/extents_status.c | 28 +--
fs/ext4/fast_commit.c | 8 +-
fs/ext4/ialloc.c | 10 +-
fs/ext4/indirect.c | 2 +-
fs/ext4/inline.c | 14 +-
fs/ext4/inode.c | 22 +--
fs/ext4/ioctl.c | 4 +-
fs/ext4/mballoc.c | 6 +-
fs/ext4/migrate.c | 2 +-
fs/ext4/move_extent.c | 20 +--
fs/ext4/namei.c | 10 +-
fs/ext4/orphan.c | 16 +-
fs/ext4/page-io.c | 10 +-
fs/ext4/super.c | 22 +--
fs/ext4/xattr.c | 10 +-
include/trace/events/ext4.h | 427 ++++++++++++++++++++++----------------------
19 files changed, 313 insertions(+), 312 deletions(-)
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index 28b2a3deb954fe275cd2f7290f2daeafa2d3dbed..17edd678fa87b8f024232081888c4054d42a7bd9 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -535,7 +535,7 @@ static int call_filldir(struct file *file, struct dir_context *ctx,
struct super_block *sb = inode->i_sb;
if (!fname) {
- ext4_msg(sb, KERN_ERR, "%s:%d: inode #%lu: comm %s: "
+ ext4_msg(sb, KERN_ERR, "%s:%d: inode #%llu: comm %s: "
"called with null fname?!?", __func__, __LINE__,
inode->i_ino, current->comm);
return 0;
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 293f698b7042438b2757790717db22bca060797d..85e6c2b543a82e83b777c2cc2f54a6ed53b554f2 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -92,7 +92,7 @@
*/
#ifdef CONFIG_EXT4_DEBUG
#define ext_debug(ino, fmt, ...) \
- pr_debug("[%s/%d] EXT4-fs (%s): ino %lu: (%s, %d): %s:" fmt, \
+ pr_debug("[%s/%d] EXT4-fs (%s): ino %llu: (%s, %d): %s:" fmt, \
current->comm, task_pid_nr(current), \
ino->i_sb->s_id, ino->i_ino, __FILE__, __LINE__, \
__func__, ##__VA_ARGS__)
@@ -3229,7 +3229,7 @@ extern void __dump_mmp_msg(struct super_block *, struct mmp_struct *mmp,
extern __printf(7, 8)
void __ext4_grp_locked_error(const char *, unsigned int,
struct super_block *, ext4_group_t,
- unsigned long, ext4_fsblk_t,
+ u64, ext4_fsblk_t,
const char *, ...);
#define EXT4_ERROR_INODE(inode, fmt, a...) \
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index ae3804f36535aeca4009bfae992e1f2f665aded2..042e1555a674149f8d47716f288ca175556b6b45 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4603,7 +4603,7 @@ static int ext4_alloc_file_blocks(struct file *file, ext4_lblk_t offset,
}
ret = ext4_map_blocks(handle, inode, &map, flags);
if (ret <= 0) {
- ext4_debug("inode #%lu: block %u: len %u: "
+ ext4_debug("inode #%llu: block %u: len %u: "
"ext4_ext_map_blocks returned %d",
inode->i_ino, map.m_lblk,
map.m_len, ret);
@@ -4955,7 +4955,7 @@ int ext4_convert_unwritten_extents_atomic(handle_t *handle, struct inode *inode,
ret = ext4_map_blocks(handle, inode, &map, flags);
if (ret != max_blocks)
ext4_msg(inode->i_sb, KERN_INFO,
- "inode #%lu: block %u: len %u: "
+ "inode #%llu: block %u: len %u: "
"split block mapping found for atomic write, "
"ret = %d",
inode->i_ino, map.m_lblk,
@@ -4974,7 +4974,7 @@ int ext4_convert_unwritten_extents_atomic(handle_t *handle, struct inode *inode,
if (ret <= 0 || ret2)
ext4_warning(inode->i_sb,
- "inode #%lu: block %u: len %u: "
+ "inode #%llu: block %u: len %u: "
"returned %d or %d",
inode->i_ino, map.m_lblk,
map.m_len, ret, ret2);
@@ -5031,7 +5031,7 @@ int ext4_convert_unwritten_extents(handle_t *handle, struct inode *inode,
EXT4_EX_NOCACHE);
if (ret <= 0)
ext4_warning(inode->i_sb,
- "inode #%lu: block %u: len %u: "
+ "inode #%llu: block %u: len %u: "
"ext4_ext_map_blocks returned %d",
inode->i_ino, map.m_lblk,
map.m_len, ret);
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index a1538bac51c61d81881be2e3fd67113f24c16df1..6e4a191e821915d2b61646f46304ffab6d531126 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -214,7 +214,7 @@ static void ext4_es_print_tree(struct inode *inode)
struct ext4_es_tree *tree;
struct rb_node *node;
- printk(KERN_DEBUG "status extents for inode %lu:", inode->i_ino);
+ printk(KERN_DEBUG "status extents for inode %llu:", inode->i_ino);
tree = &EXT4_I(inode)->i_es_tree;
node = rb_first(&tree->root);
while (node) {
@@ -703,7 +703,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
if (!ext4_es_is_written(es) && !ext4_es_is_unwritten(es)) {
if (in_range(es->es_lblk, ee_block, ee_len)) {
pr_warn("ES insert assertion failed for "
- "inode: %lu we can find an extent "
+ "inode: %llu we can find an extent "
"at block [%d/%d/%llu/%c], but we "
"want to add a delayed/hole extent "
"[%d/%d/%llu/%x]\n",
@@ -721,7 +721,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
*/
if (es->es_lblk < ee_block ||
ext4_es_pblock(es) != ee_start + es->es_lblk - ee_block) {
- pr_warn("ES insert assertion failed for inode: %lu "
+ pr_warn("ES insert assertion failed for inode: %llu "
"ex_status [%d/%d/%llu/%c] != "
"es_status [%d/%d/%llu/%c]\n", inode->i_ino,
ee_block, ee_len, ee_start,
@@ -731,7 +731,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
}
if (ee_status ^ es_status) {
- pr_warn("ES insert assertion failed for inode: %lu "
+ pr_warn("ES insert assertion failed for inode: %llu "
"ex_status [%d/%d/%llu/%c] != "
"es_status [%d/%d/%llu/%c]\n", inode->i_ino,
ee_block, ee_len, ee_start,
@@ -744,7 +744,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
* that we don't want to add an written/unwritten extent.
*/
if (!ext4_es_is_delayed(es) && !ext4_es_is_hole(es)) {
- pr_warn("ES insert assertion failed for inode: %lu "
+ pr_warn("ES insert assertion failed for inode: %llu "
"can't find an extent at block %d but we want "
"to add a written/unwritten extent "
"[%d/%d/%llu/%x]\n", inode->i_ino,
@@ -779,7 +779,7 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode,
* We want to add a delayed/hole extent but this
* block has been allocated.
*/
- pr_warn("ES insert assertion failed for inode: %lu "
+ pr_warn("ES insert assertion failed for inode: %llu "
"We can find blocks but we want to add a "
"delayed/hole extent [%d/%d/%llu/%x]\n",
inode->i_ino, es->es_lblk, es->es_len,
@@ -788,13 +788,13 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode,
} else if (ext4_es_is_written(es)) {
if (retval != es->es_len) {
pr_warn("ES insert assertion failed for "
- "inode: %lu retval %d != es_len %d\n",
+ "inode: %llu retval %d != es_len %d\n",
inode->i_ino, retval, es->es_len);
return;
}
if (map.m_pblk != ext4_es_pblock(es)) {
pr_warn("ES insert assertion failed for "
- "inode: %lu m_pblk %llu != "
+ "inode: %llu m_pblk %llu != "
"es_pblk %llu\n",
inode->i_ino, map.m_pblk,
ext4_es_pblock(es));
@@ -809,7 +809,7 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode,
}
} else if (retval == 0) {
if (ext4_es_is_written(es)) {
- pr_warn("ES insert assertion failed for inode: %lu "
+ pr_warn("ES insert assertion failed for inode: %llu "
"We can't find the block but we want to add "
"a written extent [%d/%d/%llu/%x]\n",
inode->i_ino, es->es_lblk, es->es_len,
@@ -919,7 +919,7 @@ void ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
return;
- es_debug("add [%u/%u) %llu %x %d to extent status tree of inode %lu\n",
+ es_debug("add [%u/%u) %llu %x %d to extent status tree of inode %llu\n",
lblk, len, pblk, status, delalloc_reserve_used, inode->i_ino);
if (!len)
@@ -1631,7 +1631,7 @@ void ext4_es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
return;
- es_debug("remove [%u/%u) from extent status tree of inode %lu\n",
+ es_debug("remove [%u/%u) from extent status tree of inode %llu\n",
lblk, len, inode->i_ino);
if (!len)
@@ -1821,7 +1821,7 @@ int ext4_seq_es_shrinker_info_show(struct seq_file *seq, void *v)
seq_printf(seq, " %lu shrunk objects\n", es_stats->es_stats_shrunk);
if (inode_cnt)
seq_printf(seq,
- "maximum:\n %lu inode (%u objects, %u reclaimable)\n"
+ "maximum:\n %llu inode (%u objects, %u reclaimable)\n"
" %llu us max scan time\n",
max->vfs_inode.i_ino, max->i_es_all_nr, max->i_es_shk_nr,
div_u64(es_stats->es_stats_max_scan_time, 1000));
@@ -1998,7 +1998,7 @@ static void ext4_print_pending_tree(struct inode *inode)
struct rb_node *node;
struct pending_reservation *pr;
- printk(KERN_DEBUG "pending reservations for inode %lu:", inode->i_ino);
+ printk(KERN_DEBUG "pending reservations for inode %llu:", inode->i_ino);
tree = &EXT4_I(inode)->i_pending_tree;
node = rb_first(&tree->root);
while (node) {
@@ -2214,7 +2214,7 @@ void ext4_es_insert_delayed_extent(struct inode *inode, ext4_lblk_t lblk,
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
return;
- es_debug("add [%u/%u) delayed to extent status tree of inode %lu\n",
+ es_debug("add [%u/%u) delayed to extent status tree of inode %llu\n",
lblk, len, inode->i_ino);
if (!len)
return;
diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
index f575751f1cae430eead31afa4f7d03ade1099d4a..379fb66dedbcd1c87b960cfe8786601700f797f3 100644
--- a/fs/ext4/fast_commit.c
+++ b/fs/ext4/fast_commit.c
@@ -616,7 +616,7 @@ static int __track_range(handle_t *handle, struct inode *inode, void *arg,
(struct __track_range_args *)arg;
if (inode->i_ino < EXT4_FIRST_INO(inode->i_sb)) {
- ext4_debug("Special inode %ld being modified\n", inode->i_ino);
+ ext4_debug("Special inode %llu being modified\n", inode->i_ino);
return -ECANCELED;
}
@@ -914,7 +914,7 @@ static int ext4_fc_write_inode_data(struct inode *inode, u32 *crc)
spin_unlock(&ei->i_fc_lock);
cur_lblk_off = old_blk_size;
- ext4_debug("will try writing %d to %d for inode %ld\n",
+ ext4_debug("will try writing %d to %d for inode %llu\n",
cur_lblk_off, new_blk_size, inode->i_ino);
while (cur_lblk_off <= new_blk_size) {
@@ -1792,7 +1792,7 @@ static int ext4_fc_replay_add_range(struct super_block *sb,
cur = start;
remaining = len;
- ext4_debug("ADD_RANGE, lblk %d, pblk %lld, len %d, unwritten %d, inode %ld\n",
+ ext4_debug("ADD_RANGE, lblk %d, pblk %lld, len %d, unwritten %d, inode %llu\n",
start, start_pblk, len, ext4_ext_is_unwritten(ex),
inode->i_ino);
@@ -1903,7 +1903,7 @@ ext4_fc_replay_del_range(struct super_block *sb,
if (ret)
goto out;
- ext4_debug("DEL_RANGE, inode %ld, lblk %d, len %d\n",
+ ext4_debug("DEL_RANGE, inode %llu, lblk %d, len %d\n",
inode->i_ino, le32_to_cpu(lrange.fc_lblk),
le32_to_cpu(lrange.fc_len));
while (remaining > 0) {
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index b20a1bf866abedf3a768ee8a147f108ea09ecb01..628a74b2bbe6232eabbf2562ffd0e350ea37446e 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -253,13 +253,13 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
return;
}
if (icount_read(inode) > 1) {
- ext4_msg(sb, KERN_ERR, "%s:%d: inode #%lu: count=%d",
+ ext4_msg(sb, KERN_ERR, "%s:%d: inode #%llu: count=%d",
__func__, __LINE__, inode->i_ino,
icount_read(inode));
return;
}
if (inode->i_nlink) {
- ext4_msg(sb, KERN_ERR, "%s:%d: inode #%lu: nlink=%d\n",
+ ext4_msg(sb, KERN_ERR, "%s:%d: inode #%llu: nlink=%d\n",
__func__, __LINE__, inode->i_ino, inode->i_nlink);
return;
}
@@ -631,7 +631,7 @@ static int find_group_other(struct super_block *sb, struct inode *parent,
*
* So add our directory's i_ino into the starting point for the hash.
*/
- *group = (*group + parent->i_ino) % ngroups;
+ *group = (*group + (unsigned int)parent->i_ino) % ngroups;
/*
* Use a quadratic hash to find a group with a free inode and some free
@@ -1275,7 +1275,7 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,
* twice.
*/
err = -EIO;
- ext4_error(sb, "failed to insert inode %lu: doubly allocated?",
+ ext4_error(sb, "failed to insert inode %llu: doubly allocated?",
inode->i_ino);
ext4_mark_group_bitmap_corrupted(sb, group,
EXT4_GROUP_INFO_IBITMAP_CORRUPT);
@@ -1344,7 +1344,7 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,
goto fail_free_drop;
}
- ext4_debug("allocating inode %lu\n", inode->i_ino);
+ ext4_debug("allocating inode %llu\n", inode->i_ino);
trace_ext4_allocate_inode(inode, dir, mode);
brelse(inode_bitmap_bh);
return ret;
diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c
index da76353b3a5750987d7b4803c388248b749a68a8..5aec759eed7055dbe954c25da0181ebd04bb0be3 100644
--- a/fs/ext4/indirect.c
+++ b/fs/ext4/indirect.c
@@ -102,7 +102,7 @@ static int ext4_block_to_path(struct inode *inode,
offsets[n++] = i_block & (ptrs - 1);
final = ptrs;
} else {
- ext4_warning(inode->i_sb, "block %lu > max in inode %lu",
+ ext4_warning(inode->i_sb, "block %lu > max in inode %llu",
i_block + direct_blocks +
indirect_blocks + double_blocks, inode->i_ino);
}
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 1f6bc05593df165776fda3ab2c272af586d80279..f846fcb7db2442149776fa2ba45ddc5e0b71245e 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -119,7 +119,7 @@ int ext4_get_max_inline_size(struct inode *inode)
error = ext4_get_inode_loc(inode, &iloc);
if (error) {
ext4_error_inode_err(inode, __func__, __LINE__, 0, -error,
- "can't get inode location %lu",
+ "can't get inode location %llu",
inode->i_ino);
return 0;
}
@@ -512,7 +512,7 @@ static int ext4_read_inline_folio(struct inode *inode, struct folio *folio)
BUG_ON(folio->index);
if (!EXT4_I(inode)->i_inline_off) {
- ext4_warning(inode->i_sb, "inode %lu doesn't have inline data.",
+ ext4_warning(inode->i_sb, "inode %llu doesn't have inline data.",
inode->i_ino);
goto out;
}
@@ -934,7 +934,7 @@ void ext4_show_inline_dir(struct inode *dir, struct buffer_head *bh,
struct ext4_dir_entry_2 *de = inline_start;
void *dlimit = inline_start + inline_size;
- trace_printk("inode %lu\n", dir->i_ino);
+ trace_printk("inode %llu\n", dir->i_ino);
offset = 0;
while ((void *)de < dlimit) {
de_len = ext4_rec_len_from_disk(de->rec_len, inline_size);
@@ -1071,7 +1071,7 @@ static void ext4_restore_inline_data(handle_t *handle, struct inode *inode,
ret = ext4_create_inline_data(handle, inode, inline_size);
if (ret) {
ext4_msg(inode->i_sb, KERN_EMERG,
- "error restoring inline_data for inode -- potential data loss! (inode %lu, error %d)",
+ "error restoring inline_data for inode -- potential data loss! (inode %llu, error %d)",
inode->i_ino, ret);
return;
}
@@ -1740,7 +1740,7 @@ bool empty_inline_dir(struct inode *dir, int *has_inline_data)
err = ext4_get_inode_loc(dir, &iloc);
if (err) {
EXT4_ERROR_INODE_ERR(dir, -err,
- "error %d getting inode %lu block",
+ "error %d getting inode %llu block",
err, dir->i_ino);
return false;
}
@@ -1755,7 +1755,7 @@ bool empty_inline_dir(struct inode *dir, int *has_inline_data)
de = (struct ext4_dir_entry_2 *)ext4_raw_inode(&iloc)->i_block;
if (!le32_to_cpu(de->inode)) {
ext4_warning(dir->i_sb,
- "bad inline directory (dir #%lu) - no `..'",
+ "bad inline directory (dir #%llu) - no `..'",
dir->i_ino);
goto out;
}
@@ -1769,7 +1769,7 @@ bool empty_inline_dir(struct inode *dir, int *has_inline_data)
iloc.bh, inline_pos,
inline_size, offset)) {
ext4_warning(dir->i_sb,
- "bad inline directory (dir #%lu) - "
+ "bad inline directory (dir #%llu) - "
"inode %u, rec_len %u, name_len %d"
"inline size %d",
dir->i_ino, le32_to_cpu(de->inode),
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 396dc3a5d16b4dc4d3e5c6541871a9bb896f6d7a..d50f31124a784ba6eeb916f9a2f62ec840aee52e 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -262,7 +262,7 @@ void ext4_evict_inode(struct inode *inode)
err = ext4_truncate(inode);
if (err) {
ext4_error_err(inode->i_sb, -err,
- "couldn't truncate inode %lu (err %d)",
+ "couldn't truncate inode %llu (err %d)",
inode->i_ino, err);
goto stop_handle;
}
@@ -342,7 +342,7 @@ void ext4_da_update_reserve_space(struct inode *inode,
spin_lock(&ei->i_block_reservation_lock);
trace_ext4_da_update_reserve_space(inode, used, quota_claim);
if (unlikely(used > ei->i_reserved_data_blocks)) {
- ext4_warning(inode->i_sb, "%s: ino %lu, used %d "
+ ext4_warning(inode->i_sb, "%s: ino %llu, used %d "
"with only %d reserved data blocks",
__func__, inode->i_ino, used,
ei->i_reserved_data_blocks);
@@ -475,7 +475,7 @@ static void ext4_map_blocks_es_recheck(handle_t *handle,
if (es_map->m_lblk != map->m_lblk ||
es_map->m_flags != map->m_flags ||
es_map->m_pblk != map->m_pblk) {
- printk("ES cache assertion failed for inode: %lu "
+ printk("ES cache assertion failed for inode: %llu "
"es_cached ex [%d/%d/%llu/%x] != "
"found ex [%d/%d/%llu/%x] retval %d flags %x\n",
inode->i_ino, es_map->m_lblk, es_map->m_len,
@@ -515,7 +515,7 @@ static int ext4_map_query_blocks_next_in_leaf(handle_t *handle,
if (unlikely(retval != map2.m_len)) {
ext4_warning(inode->i_sb,
"ES len assertion failed for inode "
- "%lu: retval %d != map->m_len %d",
+ "%llu: retval %d != map->m_len %d",
inode->i_ino, retval, map2.m_len);
WARN_ON(1);
}
@@ -563,7 +563,7 @@ int ext4_map_query_blocks(handle_t *handle, struct inode *inode,
if (unlikely(retval != map->m_len)) {
ext4_warning(inode->i_sb,
"ES len assertion failed for inode "
- "%lu: retval %d != map->m_len %d",
+ "%llu: retval %d != map->m_len %d",
inode->i_ino, retval, map->m_len);
WARN_ON(1);
}
@@ -630,7 +630,7 @@ int ext4_map_create_blocks(handle_t *handle, struct inode *inode,
if (unlikely(retval != map->m_len)) {
ext4_warning(inode->i_sb,
- "ES len assertion failed for inode %lu: "
+ "ES len assertion failed for inode %llu: "
"retval %d != map->m_len %d",
inode->i_ino, retval, map->m_len);
WARN_ON(1);
@@ -937,7 +937,7 @@ int ext4_get_block_unwritten(struct inode *inode, sector_t iblock,
{
int ret = 0;
- ext4_debug("ext4_get_block_unwritten: inode %lu, create flag %d\n",
+ ext4_debug("ext4_get_block_unwritten: inode %llu, create flag %d\n",
inode->i_ino, create);
ret = _ext4_get_block(inode, iblock, bh_result,
EXT4_GET_BLOCKS_CREATE_UNWRIT_EXT);
@@ -1659,7 +1659,7 @@ void ext4_da_release_space(struct inode *inode, int to_free)
* harmless to return without any action.
*/
ext4_warning(inode->i_sb, "ext4_da_release_space: "
- "ino %lu, to_free %d with only %d reserved "
+ "ino %llu, to_free %d with only %d reserved "
"data blocks", inode->i_ino, to_free,
ei->i_reserved_data_blocks);
WARN_ON(1);
@@ -2491,7 +2491,7 @@ static int mpage_map_and_submit_extent(handle_t *handle,
}
ext4_msg(sb, KERN_CRIT,
"Delayed block allocation failed for "
- "inode %lu at logical offset %llu with"
+ "inode %llu at logical offset %llu with"
" max blocks %u with error %d",
inode->i_ino,
(unsigned long long)map->m_lblk,
@@ -2535,7 +2535,7 @@ static int mpage_map_and_submit_extent(handle_t *handle,
err2 = ext4_mark_inode_dirty(handle, inode);
if (err2) {
ext4_error_err(inode->i_sb, -err2,
- "Failed to mark inode %lu dirty",
+ "Failed to mark inode %llu dirty",
inode->i_ino);
}
if (!err)
@@ -2909,7 +2909,7 @@ static int ext4_do_writepages(struct mpage_da_data *mpd)
if (IS_ERR(handle)) {
ret = PTR_ERR(handle);
ext4_msg(inode->i_sb, KERN_CRIT, "%s: jbd2_start: "
- "%ld pages, ino %lu; err %d", __func__,
+ "%ld pages, ino %llu; err %d", __func__,
wbc->nr_to_write, inode->i_ino, ret);
/* Release allocated io_end */
ext4_put_io_end(mpd->io_submit.io_end);
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 3ae9cb50a0c057f10f6bda8165ba45fd2c368cfb..1d0c3d4bdf472715a7070b184fdc7d9bf5885950 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -477,7 +477,7 @@ static long swap_inode_boot_loader(struct super_block *sb,
if (err < 0) {
/* No need to update quota information. */
ext4_warning(inode->i_sb,
- "couldn't mark inode #%lu dirty (err %d)",
+ "couldn't mark inode #%llu dirty (err %d)",
inode->i_ino, err);
/* Revert all changes: */
swap_inode_data(inode, inode_bl);
@@ -493,7 +493,7 @@ static long swap_inode_boot_loader(struct super_block *sb,
if (err < 0) {
/* No need to update quota information. */
ext4_warning(inode_bl->i_sb,
- "couldn't mark inode #%lu dirty (err %d)",
+ "couldn't mark inode #%llu dirty (err %d)",
inode_bl->i_ino, err);
goto revert;
}
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 20e9fdaf4301b61c9d54401ed95067db6b6b8173..9e8041ac56239e64326343b0adef062611189d6a 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2266,7 +2266,7 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac,
folio_get(ac->ac_buddy_folio);
/* store last allocated for subsequent stream allocation */
if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) {
- int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals;
+ int hash = (unsigned int)ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals;
WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group);
}
@@ -3032,7 +3032,7 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
/* if stream allocation is enabled, use global goal */
if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) {
- int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals;
+ int hash = (unsigned int)ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals;
ac->ac_g_ex.fe_group = READ_ONCE(sbi->s_mb_last_groups[hash]);
ac->ac_g_ex.fe_start = -1;
@@ -5628,7 +5628,7 @@ void ext4_discard_preallocations(struct inode *inode)
if (EXT4_SB(sb)->s_mount_state & EXT4_FC_REPLAY)
return;
- mb_debug(sb, "discard preallocation for inode %lu\n",
+ mb_debug(sb, "discard preallocation for inode %llu\n",
inode->i_ino);
trace_ext4_discard_preallocations(inode,
atomic_read(&ei->i_prealloc_active));
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index 96ab95167bd6e10ba86e61a60cb0be9fbafe157f..43103816b80ef4901858bcd789acb0ffb2612317 100644
--- a/fs/ext4/migrate.c
+++ b/fs/ext4/migrate.c
@@ -455,7 +455,7 @@ int ext4_ext_migrate(struct inode *inode)
* log, so disable fast commits for this transaction.
*/
ext4_fc_mark_ineligible(inode->i_sb, EXT4_FC_REASON_MIGRATE, handle);
- goal = (((inode->i_ino - 1) / EXT4_INODES_PER_GROUP(inode->i_sb)) *
+ goal = (div_u64(inode->i_ino - 1, EXT4_INODES_PER_GROUP(inode->i_sb)) *
EXT4_INODES_PER_GROUP(inode->i_sb)) + 1;
owner[0] = i_uid_read(inode);
owner[1] = i_gid_read(inode);
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index ce1f738dff938c5685ef87099df4c87702657a39..ab17c1d3a7b51198c2332e8a1dd44f7a1bff40cf 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -420,21 +420,21 @@ static int mext_check_validity(struct inode *orig_inode,
/* origin and donor should be different inodes */
if (orig_inode == donor_inode) {
- ext4_debug("ext4 move extent: The argument files should not be same inode [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: The argument files should not be same inode [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
/* origin and donor should belone to the same filesystem */
if (orig_inode->i_sb != donor_inode->i_sb) {
- ext4_debug("ext4 move extent: The argument files should be in same FS [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: The argument files should be in same FS [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
/* Regular file check */
if (!S_ISREG(orig_inode->i_mode) || !S_ISREG(donor_inode->i_mode)) {
- ext4_debug("ext4 move extent: The argument files should be regular file [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: The argument files should be regular file [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
@@ -477,26 +477,26 @@ static int mext_check_validity(struct inode *orig_inode,
}
if (donor_inode->i_mode & (S_ISUID|S_ISGID)) {
- ext4_debug("ext4 move extent: suid or sgid is set to donor file [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: suid or sgid is set to donor file [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
if (IS_IMMUTABLE(donor_inode) || IS_APPEND(donor_inode)) {
- ext4_debug("ext4 move extent: donor should not be immutable or append file [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: donor should not be immutable or append file [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EPERM;
}
/* Ext4 move extent does not support swap files */
if (IS_SWAPFILE(orig_inode) || IS_SWAPFILE(donor_inode)) {
- ext4_debug("ext4 move extent: The argument files should not be swap files [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: The argument files should not be swap files [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -ETXTBSY;
}
if (ext4_is_quota_file(orig_inode) || ext4_is_quota_file(donor_inode)) {
- ext4_debug("ext4 move extent: The argument files should not be quota files [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: The argument files should not be quota files [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EOPNOTSUPP;
}
@@ -523,7 +523,7 @@ static int mext_check_adjust_range(struct inode *orig_inode,
/* Start offset should be same */
if ((orig_start & ~(PAGE_MASK >> orig_inode->i_blkbits)) !=
(donor_start & ~(PAGE_MASK >> orig_inode->i_blkbits))) {
- ext4_debug("ext4 move extent: orig and donor's start offsets are not aligned [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: orig and donor's start offsets are not aligned [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
@@ -533,7 +533,7 @@ static int mext_check_adjust_range(struct inode *orig_inode,
(*len > EXT_MAX_BLOCKS) ||
(donor_start + *len >= EXT_MAX_BLOCKS) ||
(orig_start + *len >= EXT_MAX_BLOCKS)) {
- ext4_debug("ext4 move extent: Can't handle over [%u] blocks [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: Can't handle over [%u] blocks [ino:orig %llu, donor %llu]\n",
EXT_MAX_BLOCKS,
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
@@ -550,7 +550,7 @@ static int mext_check_adjust_range(struct inode *orig_inode,
else if (donor_eof < donor_start + *len - 1)
*len = donor_eof - donor_start;
if (!*len) {
- ext4_debug("ext4 move extent: len should not be 0 [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: len should not be 0 [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index c4b5e252af0efbfcbaf83688a32d445327a74a02..503dc9ffd61465686bb1a253bfeee41c0e9acd59 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -144,7 +144,7 @@ static struct buffer_head *__ext4_read_dirblock(struct inode *inode,
bh = ext4_bread(NULL, inode, block, 0);
if (IS_ERR(bh)) {
__ext4_warning(inode->i_sb, func, line,
- "inode #%lu: lblock %lu: comm %s: "
+ "inode #%llu: lblock %lu: comm %s: "
"error %ld reading directory block",
inode->i_ino, (unsigned long)block,
current->comm, PTR_ERR(bh));
@@ -841,7 +841,7 @@ dx_probe(struct ext4_filename *fname, struct inode *dir,
indirect = root->info.indirect_levels;
if (indirect >= ext4_dir_htree_level(dir->i_sb)) {
ext4_warning(dir->i_sb,
- "Directory (ino: %lu) htree depth %#06x exceed"
+ "Directory (ino: %llu) htree depth %#06x exceed"
"supported value", dir->i_ino,
ext4_dir_htree_level(dir->i_sb));
if (ext4_dir_htree_level(dir->i_sb) < EXT4_HTREE_LEVEL) {
@@ -1793,7 +1793,7 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, unsi
(S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) &&
!fscrypt_has_permitted_context(dir, inode)) {
ext4_warning(inode->i_sb,
- "Inconsistent encryption contexts: %lu/%lu",
+ "Inconsistent encryption contexts: %llu/%llu",
dir->i_ino, inode->i_ino);
iput(inode);
return ERR_PTR(-EPERM);
@@ -2227,7 +2227,7 @@ static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname,
csum_size = sizeof(struct ext4_dir_entry_tail);
blocksize = dir->i_sb->s_blocksize;
- dxtrace(printk(KERN_DEBUG "Creating index: inode %lu\n", dir->i_ino));
+ dxtrace(printk(KERN_DEBUG "Creating index: inode %llu\n", dir->i_ino));
BUFFER_TRACE(bh, "get_write_access");
retval = ext4_journal_get_write_access(handle, dir->i_sb, bh,
EXT4_JTR_NONE);
@@ -2523,7 +2523,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname,
restart = 1;
}
if (add_level && levels == ext4_dir_htree_level(sb)) {
- ext4_warning(sb, "Directory (ino: %lu) index full, "
+ ext4_warning(sb, "Directory (ino: %llu) index full, "
"reach max htree level :%d",
dir->i_ino, levels);
if (ext4_dir_htree_level(sb) < EXT4_HTREE_LEVEL) {
diff --git a/fs/ext4/orphan.c b/fs/ext4/orphan.c
index c0022f0bff8749badfe80d2a7628bea5ce96ab1e..64ea4762423386db79e739a2448bf70c12415ef8 100644
--- a/fs/ext4/orphan.c
+++ b/fs/ext4/orphan.c
@@ -179,8 +179,8 @@ int ext4_orphan_add(handle_t *handle, struct inode *inode)
} else
brelse(iloc.bh);
- ext4_debug("superblock will point to %lu\n", inode->i_ino);
- ext4_debug("orphan inode %lu will point to %d\n",
+ ext4_debug("superblock will point to %llu\n", inode->i_ino);
+ ext4_debug("orphan inode %llu will point to %d\n",
inode->i_ino, NEXT_ORPHAN(inode));
out:
ext4_std_error(sb, err);
@@ -249,7 +249,7 @@ int ext4_orphan_del(handle_t *handle, struct inode *inode)
}
mutex_lock(&sbi->s_orphan_lock);
- ext4_debug("remove inode %lu from orphan list\n", inode->i_ino);
+ ext4_debug("remove inode %llu from orphan list\n", inode->i_ino);
prev = ei->i_orphan.prev;
list_del_init(&ei->i_orphan);
@@ -284,7 +284,7 @@ int ext4_orphan_del(handle_t *handle, struct inode *inode)
struct inode *i_prev =
&list_entry(prev, struct ext4_inode_info, i_orphan)->vfs_inode;
- ext4_debug("orphan inode %lu will point to %u\n",
+ ext4_debug("orphan inode %llu will point to %u\n",
i_prev->i_ino, ino_next);
err = ext4_reserve_inode_write(handle, i_prev, &iloc2);
if (err) {
@@ -328,9 +328,9 @@ static void ext4_process_orphan(struct inode *inode,
if (inode->i_nlink) {
if (test_opt(sb, DEBUG))
ext4_msg(sb, KERN_DEBUG,
- "%s: truncating inode %lu to %lld bytes",
+ "%s: truncating inode %llu to %lld bytes",
__func__, inode->i_ino, inode->i_size);
- ext4_debug("truncating inode %lu to %lld bytes\n",
+ ext4_debug("truncating inode %llu to %lld bytes\n",
inode->i_ino, inode->i_size);
inode_lock(inode);
truncate_inode_pages(inode->i_mapping, inode->i_size);
@@ -349,9 +349,9 @@ static void ext4_process_orphan(struct inode *inode,
} else {
if (test_opt(sb, DEBUG))
ext4_msg(sb, KERN_DEBUG,
- "%s: deleting unreferenced inode %lu",
+ "%s: deleting unreferenced inode %llu",
__func__, inode->i_ino);
- ext4_debug("deleting unreferenced inode %lu\n",
+ ext4_debug("deleting unreferenced inode %llu\n",
inode->i_ino);
(*nr_orphans)++;
}
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index a8c95eee91b79e36ebde09fac9033be359baf8fc..86011275ad83668d591488fad90959ec04625c55 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -180,7 +180,7 @@ static int ext4_end_io_end(ext4_io_end_t *io_end)
struct super_block *sb = inode->i_sb;
int ret = 0;
- ext4_debug("ext4_end_io_nolock: io_end 0x%p from inode %lu,list->next 0x%p,"
+ ext4_debug("ext4_end_io_nolock: io_end 0x%p from inode %llu,list->next 0x%p,"
"list->prev 0x%p\n",
io_end, inode->i_ino, io_end->list.next, io_end->list.prev);
@@ -204,7 +204,7 @@ static int ext4_end_io_end(ext4_io_end_t *io_end)
ext4_msg(sb, KERN_EMERG,
"failed to convert unwritten extents to written "
"extents -- potential data loss! "
- "(inode %lu, error %d)", inode->i_ino, ret);
+ "(inode %llu, error %d)", inode->i_ino, ret);
}
ext4_clear_io_unwritten_flag(io_end);
@@ -221,7 +221,7 @@ static void dump_completed_IO(struct inode *inode, struct list_head *head)
if (list_empty(head))
return;
- ext4_debug("Dump inode %lu completed io list\n", inode->i_ino);
+ ext4_debug("Dump inode %llu completed io list\n", inode->i_ino);
list_for_each_entry(io_end, head, list) {
cur = &io_end->list;
before = cur->prev;
@@ -229,7 +229,7 @@ static void dump_completed_IO(struct inode *inode, struct list_head *head)
after = cur->next;
io_end1 = container_of(after, ext4_io_end_t, list);
- ext4_debug("io 0x%p from inode %lu,prev 0x%p,next 0x%p\n",
+ ext4_debug("io 0x%p from inode %llu,prev 0x%p,next 0x%p\n",
io_end, inode->i_ino, io_end0, io_end1);
}
#endif
@@ -366,7 +366,7 @@ static void ext4_end_bio(struct bio *bio)
if (bio->bi_status) {
struct inode *inode = io_end->inode;
- ext4_warning(inode->i_sb, "I/O error %d writing to inode %lu "
+ ext4_warning(inode->i_sb, "I/O error %d writing to inode %llu "
"starting block %llu)",
bio->bi_status, inode->i_ino,
(unsigned long long)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 43f680c750ae6b2cacb35bcaad262ba234676ef4..781c083000c2ea2232846b0827c7d4799d87bd5d 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -848,12 +848,12 @@ void __ext4_error_inode(struct inode *inode, const char *function,
vaf.va = &args;
if (block)
printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: "
- "inode #%lu: block %llu: comm %s: %pV\n",
+ "inode #%llu: block %llu: comm %s: %pV\n",
inode->i_sb->s_id, function, line, inode->i_ino,
block, current->comm, &vaf);
else
printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: "
- "inode #%lu: comm %s: %pV\n",
+ "inode #%llu: comm %s: %pV\n",
inode->i_sb->s_id, function, line, inode->i_ino,
current->comm, &vaf);
va_end(args);
@@ -888,13 +888,13 @@ void __ext4_error_file(struct file *file, const char *function,
vaf.va = &args;
if (block)
printk(KERN_CRIT
- "EXT4-fs error (device %s): %s:%d: inode #%lu: "
+ "EXT4-fs error (device %s): %s:%d: inode #%llu: "
"block %llu: comm %s: path %s: %pV\n",
inode->i_sb->s_id, function, line, inode->i_ino,
block, current->comm, path, &vaf);
else
printk(KERN_CRIT
- "EXT4-fs error (device %s): %s:%d: inode #%lu: "
+ "EXT4-fs error (device %s): %s:%d: inode #%llu: "
"comm %s: path %s: %pV\n",
inode->i_sb->s_id, function, line, inode->i_ino,
current->comm, path, &vaf);
@@ -1035,14 +1035,14 @@ void __ext4_warning_inode(const struct inode *inode, const char *function,
vaf.fmt = fmt;
vaf.va = &args;
printk(KERN_WARNING "EXT4-fs warning (device %s): %s:%d: "
- "inode #%lu: comm %s: %pV\n", inode->i_sb->s_id,
+ "inode #%llu: comm %s: %pV\n", inode->i_sb->s_id,
function, line, inode->i_ino, current->comm, &vaf);
va_end(args);
}
void __ext4_grp_locked_error(const char *function, unsigned int line,
struct super_block *sb, ext4_group_t grp,
- unsigned long ino, ext4_fsblk_t block,
+ u64 ino, ext4_fsblk_t block,
const char *fmt, ...)
__releases(bitlock)
__acquires(bitlock)
@@ -1061,7 +1061,7 @@ __acquires(bitlock)
printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: group %u, ",
sb->s_id, function, line, grp);
if (ino)
- printk(KERN_CONT "inode %lu: ", ino);
+ printk(KERN_CONT "inode %llu: ", ino);
if (block)
printk(KERN_CONT "block %llu:",
(unsigned long long) block);
@@ -1170,7 +1170,7 @@ static void dump_orphan_list(struct super_block *sb, struct ext4_sb_info *sbi)
list_for_each(l, &sbi->s_orphan) {
struct inode *inode = orphan_list_entry(l);
printk(KERN_ERR " "
- "inode %s:%lu at %p: mode %o, nlink %d, next %d\n",
+ "inode %s:%llu at %p: mode %o, nlink %d, next %d\n",
inode->i_sb->s_id, inode->i_ino, inode,
inode->i_mode, inode->i_nlink,
NEXT_ORPHAN(inode));
@@ -1446,7 +1446,7 @@ static void ext4_free_in_core_inode(struct inode *inode)
{
fscrypt_free_inode(inode);
if (!list_empty(&(EXT4_I(inode)->i_fc_list))) {
- pr_warn("%s: inode %ld still in fc list",
+ pr_warn("%s: inode %llu still in fc list",
__func__, inode->i_ino);
}
kmem_cache_free(ext4_inode_cachep, EXT4_I(inode));
@@ -1456,7 +1456,7 @@ static void ext4_destroy_inode(struct inode *inode)
{
if (ext4_inode_orphan_tracked(inode)) {
ext4_msg(inode->i_sb, KERN_ERR,
- "Inode %lu (%p): inode tracked as orphan!",
+ "Inode %llu (%p): inode tracked as orphan!",
inode->i_ino, EXT4_I(inode));
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 16, 4,
EXT4_I(inode), sizeof(struct ext4_inode_info),
@@ -1467,7 +1467,7 @@ static void ext4_destroy_inode(struct inode *inode)
if (!(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_ERROR_FS) &&
WARN_ON_ONCE(EXT4_I(inode)->i_reserved_data_blocks))
ext4_msg(inode->i_sb, KERN_ERR,
- "Inode %lu (%p): i_reserved_data_blocks (%u) not cleared!",
+ "Inode %llu (%p): i_reserved_data_blocks (%u) not cleared!",
inode->i_ino, EXT4_I(inode),
EXT4_I(inode)->i_reserved_data_blocks);
}
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 7bf9ba19a89db2cd9e9536191eb904afe4c5f5d8..60aec4712f7fc52a8cc8ce31e4d5bd740a193903 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -64,7 +64,7 @@
#ifdef EXT4_XATTR_DEBUG
# define ea_idebug(inode, fmt, ...) \
- printk(KERN_DEBUG "inode %s:%lu: " fmt "\n", \
+ printk(KERN_DEBUG "inode %s:%llu: " fmt "\n", \
inode->i_sb->s_id, inode->i_ino, ##__VA_ARGS__)
# define ea_bdebug(bh, fmt, ...) \
printk(KERN_DEBUG "block %pg:%lu: " fmt "\n", \
@@ -1035,7 +1035,7 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode,
ref_count = ext4_xattr_inode_get_ref(ea_inode);
if ((ref_count == 0 && ref_change < 0) || (ref_count == U64_MAX && ref_change > 0)) {
ext4_error_inode(ea_inode, __func__, __LINE__, 0,
- "EA inode %lu ref wraparound: ref_count=%lld ref_change=%d",
+ "EA inode %llu ref wraparound: ref_count=%lld ref_change=%d",
ea_inode->i_ino, ref_count, ref_change);
brelse(iloc.bh);
ret = -EFSCORRUPTED;
@@ -1046,7 +1046,7 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode,
if (ref_change > 0) {
if (ref_count == 1) {
- WARN_ONCE(ea_inode->i_nlink, "EA inode %lu i_nlink=%u",
+ WARN_ONCE(ea_inode->i_nlink, "EA inode %llu i_nlink=%u",
ea_inode->i_ino, ea_inode->i_nlink);
set_nlink(ea_inode, 1);
@@ -1055,7 +1055,7 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode,
} else {
if (ref_count == 0) {
WARN_ONCE(ea_inode->i_nlink != 1,
- "EA inode %lu i_nlink=%u",
+ "EA inode %llu i_nlink=%u",
ea_inode->i_ino, ea_inode->i_nlink);
clear_nlink(ea_inode);
@@ -2854,7 +2854,7 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
cleanup:
if (error && (mnt_count != le16_to_cpu(sbi->s_es->s_mnt_count))) {
- ext4_warning(inode->i_sb, "Unable to expand inode %lu. Delete some EAs or run e2fsck.",
+ ext4_warning(inode->i_sb, "Unable to expand inode %llu. Delete some EAs or run e2fsck.",
inode->i_ino);
mnt_count = le16_to_cpu(sbi->s_es->s_mnt_count);
}
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index a3e8fe414df85c53e8aa15836ab93c3ae514c815..2f8b44d16df196f1439ed7f01160779a9fc4d14c 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -144,8 +144,8 @@ TRACE_EVENT(ext4_other_inode_update_time,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
- __field( ino_t, orig_ino )
+ __field( u64, ino )
+ __field( u64, orig_ino )
__field( uid_t, uid )
__field( gid_t, gid )
__field( __u16, mode )
@@ -160,10 +160,10 @@ TRACE_EVENT(ext4_other_inode_update_time,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d orig_ino %lu ino %lu mode 0%o uid %u gid %u",
+ TP_printk("dev %d,%d orig_ino %llu ino %llu mode 0%o uid %u gid %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->orig_ino,
- (unsigned long) __entry->ino, __entry->mode,
+ (unsigned long long) __entry->orig_ino,
+ (unsigned long long) __entry->ino, __entry->mode,
__entry->uid, __entry->gid)
);
@@ -174,7 +174,7 @@ TRACE_EVENT(ext4_free_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( uid_t, uid )
__field( gid_t, gid )
__field( __u64, blocks )
@@ -190,9 +190,9 @@ TRACE_EVENT(ext4_free_inode,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
+ TP_printk("dev %d,%d ino %llu mode 0%o uid %u gid %u blocks %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->mode,
+ (unsigned long long) __entry->ino, __entry->mode,
__entry->uid, __entry->gid, __entry->blocks)
);
@@ -203,7 +203,7 @@ TRACE_EVENT(ext4_request_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, dir )
+ __field( u64, dir )
__field( __u16, mode )
),
@@ -213,9 +213,9 @@ TRACE_EVENT(ext4_request_inode,
__entry->mode = mode;
),
- TP_printk("dev %d,%d dir %lu mode 0%o",
+ TP_printk("dev %d,%d dir %llu mode 0%o",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->dir, __entry->mode)
+ (unsigned long long) __entry->dir, __entry->mode)
);
TRACE_EVENT(ext4_allocate_inode,
@@ -225,8 +225,8 @@ TRACE_EVENT(ext4_allocate_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
- __field( ino_t, dir )
+ __field( u64, ino )
+ __field( u64, dir )
__field( __u16, mode )
),
@@ -237,10 +237,10 @@ TRACE_EVENT(ext4_allocate_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)
+ (unsigned long long) __entry->ino,
+ (unsigned long long) __entry->dir, __entry->mode)
);
TRACE_EVENT(ext4_evict_inode,
@@ -250,7 +250,7 @@ TRACE_EVENT(ext4_evict_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, nlink )
),
@@ -260,9 +260,9 @@ TRACE_EVENT(ext4_evict_inode,
__entry->nlink = inode->i_nlink;
),
- TP_printk("dev %d,%d ino %lu nlink %d",
+ TP_printk("dev %d,%d ino %llu nlink %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->nlink)
+ (unsigned long long) __entry->ino, __entry->nlink)
);
TRACE_EVENT(ext4_drop_inode,
@@ -272,7 +272,7 @@ TRACE_EVENT(ext4_drop_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, drop )
),
@@ -282,9 +282,9 @@ TRACE_EVENT(ext4_drop_inode,
__entry->drop = drop;
),
- TP_printk("dev %d,%d ino %lu drop %d",
+ TP_printk("dev %d,%d ino %llu drop %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->drop)
+ (unsigned long long) __entry->ino, __entry->drop)
);
TRACE_EVENT(ext4_nfs_commit_metadata,
@@ -294,7 +294,7 @@ TRACE_EVENT(ext4_nfs_commit_metadata,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
),
TP_fast_assign(
@@ -302,9 +302,9 @@ TRACE_EVENT(ext4_nfs_commit_metadata,
__entry->ino = inode->i_ino;
),
- TP_printk("dev %d,%d ino %lu",
+ TP_printk("dev %d,%d ino %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino)
+ (unsigned long long) __entry->ino)
);
TRACE_EVENT(ext4_mark_inode_dirty,
@@ -314,7 +314,7 @@ TRACE_EVENT(ext4_mark_inode_dirty,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field(unsigned long, ip )
),
@@ -324,9 +324,9 @@ TRACE_EVENT(ext4_mark_inode_dirty,
__entry->ip = IP;
),
- TP_printk("dev %d,%d ino %lu caller %pS",
+ TP_printk("dev %d,%d ino %llu caller %pS",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, (void *)__entry->ip)
+ (unsigned long long) __entry->ino, (void *)__entry->ip)
);
TRACE_EVENT(ext4_begin_ordered_truncate,
@@ -336,7 +336,7 @@ TRACE_EVENT(ext4_begin_ordered_truncate,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, new_size )
),
@@ -346,9 +346,9 @@ TRACE_EVENT(ext4_begin_ordered_truncate,
__entry->new_size = new_size;
),
- TP_printk("dev %d,%d ino %lu new_size %lld",
+ TP_printk("dev %d,%d ino %llu new_size %lld",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->new_size)
);
@@ -360,7 +360,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, pos )
__field( unsigned int, len )
),
@@ -372,9 +372,9 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
__entry->len = len;
),
- TP_printk("dev %d,%d ino %lu pos %lld len %u",
+ TP_printk("dev %d,%d ino %llu pos %lld len %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->pos, __entry->len)
);
@@ -400,7 +400,7 @@ DECLARE_EVENT_CLASS(ext4__write_end,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, pos )
__field( unsigned int, len )
__field( unsigned int, copied )
@@ -414,9 +414,9 @@ DECLARE_EVENT_CLASS(ext4__write_end,
__entry->copied = copied;
),
- TP_printk("dev %d,%d ino %lu pos %lld len %u copied %u",
+ TP_printk("dev %d,%d ino %llu pos %lld len %u copied %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->pos, __entry->len, __entry->copied)
);
@@ -451,7 +451,7 @@ TRACE_EVENT(ext4_writepages,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( long, nr_to_write )
__field( long, pages_skipped )
__field( loff_t, range_start )
@@ -475,11 +475,11 @@ TRACE_EVENT(ext4_writepages,
__entry->range_cyclic = wbc->range_cyclic;
),
- TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
+ TP_printk("dev %d,%d ino %llu nr_to_write %ld pages_skipped %ld "
"range_start %lld range_end %lld sync_mode %d "
"for_kupdate %d range_cyclic %d writeback_index %lu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->nr_to_write,
+ (unsigned long long) __entry->ino, __entry->nr_to_write,
__entry->pages_skipped, __entry->range_start,
__entry->range_end, __entry->sync_mode,
__entry->for_kupdate, __entry->range_cyclic,
@@ -494,7 +494,7 @@ TRACE_EVENT(ext4_da_write_folios_start,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, start_pos )
__field( loff_t, next_pos )
__field( long, nr_to_write )
@@ -510,9 +510,9 @@ TRACE_EVENT(ext4_da_write_folios_start,
__entry->sync_mode = wbc->sync_mode;
),
- TP_printk("dev %d,%d ino %lu start_pos 0x%llx next_pos 0x%llx nr_to_write %ld sync_mode %d",
+ TP_printk("dev %d,%d ino %llu start_pos 0x%llx next_pos 0x%llx nr_to_write %ld sync_mode %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->start_pos, __entry->next_pos,
+ (unsigned long long) __entry->ino, __entry->start_pos, __entry->next_pos,
__entry->nr_to_write, __entry->sync_mode)
);
@@ -524,7 +524,7 @@ TRACE_EVENT(ext4_da_write_folios_end,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, start_pos )
__field( loff_t, next_pos )
__field( long, nr_to_write )
@@ -540,9 +540,9 @@ TRACE_EVENT(ext4_da_write_folios_end,
__entry->ret = ret;
),
- TP_printk("dev %d,%d ino %lu start_pos 0x%llx next_pos 0x%llx nr_to_write %ld ret %d",
+ TP_printk("dev %d,%d ino %llu start_pos 0x%llx next_pos 0x%llx nr_to_write %ld ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->start_pos, __entry->next_pos,
+ (unsigned long long) __entry->ino, __entry->start_pos, __entry->next_pos,
__entry->nr_to_write, __entry->ret)
);
@@ -553,7 +553,7 @@ TRACE_EVENT(ext4_da_write_pages_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, lblk )
__field( __u32, len )
__field( __u32, flags )
@@ -567,9 +567,9 @@ TRACE_EVENT(ext4_da_write_pages_extent,
__entry->flags = map->m_flags;
),
- TP_printk("dev %d,%d ino %lu lblk %llu len %u flags %s",
+ TP_printk("dev %d,%d ino %llu lblk %llu len %u flags %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->lblk, __entry->len,
+ (unsigned long long) __entry->ino, __entry->lblk, __entry->len,
show_mflags(__entry->flags))
);
@@ -581,7 +581,7 @@ TRACE_EVENT(ext4_writepages_result,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, ret )
__field( int, pages_written )
__field( long, pages_skipped )
@@ -599,10 +599,10 @@ TRACE_EVENT(ext4_writepages_result,
__entry->sync_mode = wbc->sync_mode;
),
- TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
+ TP_printk("dev %d,%d ino %llu ret %d pages_written %d pages_skipped %ld "
"sync_mode %d writeback_index %lu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->ret,
+ (unsigned long long) __entry->ino, __entry->ret,
__entry->pages_written, __entry->pages_skipped,
__entry->sync_mode,
(unsigned long) __entry->writeback_index)
@@ -615,7 +615,7 @@ DECLARE_EVENT_CLASS(ext4__folio_op,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( pgoff_t, index )
),
@@ -626,9 +626,9 @@ DECLARE_EVENT_CLASS(ext4__folio_op,
__entry->index = folio->index;
),
- TP_printk("dev %d,%d ino %lu folio_index %lu",
+ TP_printk("dev %d,%d ino %llu folio_index %lu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned long) __entry->index)
);
@@ -653,7 +653,7 @@ DECLARE_EVENT_CLASS(ext4_invalidate_folio_op,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( pgoff_t, index )
__field( size_t, offset )
__field( size_t, length )
@@ -667,9 +667,9 @@ DECLARE_EVENT_CLASS(ext4_invalidate_folio_op,
__entry->length = length;
),
- TP_printk("dev %d,%d ino %lu folio_index %lu offset %zu length %zu",
+ TP_printk("dev %d,%d ino %llu folio_index %lu offset %zu length %zu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned long) __entry->index,
__entry->offset, __entry->length)
);
@@ -718,7 +718,7 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, pa_pstart )
__field( __u64, pa_lstart )
__field( __u32, pa_len )
@@ -733,9 +733,9 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
__entry->pa_len = pa->pa_len;
),
- TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu",
+ TP_printk("dev %d,%d ino %llu pstart %llu len %u lstart %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
);
@@ -763,7 +763,7 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, block )
__field( __u32, count )
@@ -776,9 +776,9 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
__entry->count = count;
),
- TP_printk("dev %d,%d ino %lu block %llu count %u",
+ TP_printk("dev %d,%d ino %llu block %llu count %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->block, __entry->count)
);
@@ -812,7 +812,7 @@ TRACE_EVENT(ext4_discard_preallocations,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( unsigned int, len )
),
@@ -823,9 +823,9 @@ TRACE_EVENT(ext4_discard_preallocations,
__entry->len = len;
),
- TP_printk("dev %d,%d ino %lu len: %u",
+ TP_printk("dev %d,%d ino %llu len: %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->len)
+ (unsigned long long) __entry->ino, __entry->len)
);
TRACE_EVENT(ext4_mb_discard_preallocations,
@@ -856,7 +856,7 @@ TRACE_EVENT(ext4_request_blocks,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( unsigned int, len )
__field( __u32, logical )
__field( __u32, lleft )
@@ -880,10 +880,10 @@ TRACE_EVENT(ext4_request_blocks,
__entry->flags = ar->flags;
),
- TP_printk("dev %d,%d ino %lu flags %s len %u lblk %u goal %llu "
+ TP_printk("dev %d,%d ino %llu flags %s len %u lblk %u goal %llu "
"lleft %u lright %u pleft %llu pright %llu ",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags),
+ (unsigned long long) __entry->ino, show_mballoc_flags(__entry->flags),
__entry->len, __entry->logical, __entry->goal,
__entry->lleft, __entry->lright, __entry->pleft,
__entry->pright)
@@ -896,7 +896,7 @@ TRACE_EVENT(ext4_allocate_blocks,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, block )
__field( unsigned int, len )
__field( __u32, logical )
@@ -922,10 +922,10 @@ TRACE_EVENT(ext4_allocate_blocks,
__entry->flags = ar->flags;
),
- TP_printk("dev %d,%d ino %lu flags %s len %u block %llu lblk %u "
+ TP_printk("dev %d,%d ino %llu flags %s len %u block %llu lblk %u "
"goal %llu lleft %u lright %u pleft %llu pright %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags),
+ (unsigned long long) __entry->ino, show_mballoc_flags(__entry->flags),
__entry->len, __entry->block, __entry->logical,
__entry->goal, __entry->lleft, __entry->lright,
__entry->pleft, __entry->pright)
@@ -939,7 +939,7 @@ TRACE_EVENT(ext4_free_blocks,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, block )
__field( unsigned long, count )
__field( int, flags )
@@ -955,9 +955,9 @@ TRACE_EVENT(ext4_free_blocks,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %s",
+ TP_printk("dev %d,%d ino %llu mode 0%o block %llu count %lu flags %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->mode, __entry->block, __entry->count,
show_free_flags(__entry->flags))
);
@@ -969,8 +969,8 @@ TRACE_EVENT(ext4_sync_file_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
- __field( ino_t, parent )
+ __field( u64, ino )
+ __field( u64, parent )
__field( int, datasync )
),
@@ -983,10 +983,10 @@ TRACE_EVENT(ext4_sync_file_enter,
__entry->parent = d_inode(dentry->d_parent)->i_ino;
),
- TP_printk("dev %d,%d ino %lu parent %lu datasync %d ",
+ TP_printk("dev %d,%d ino %llu parent %llu datasync %d ",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
- (unsigned long) __entry->parent, __entry->datasync)
+ (unsigned long long) __entry->ino,
+ (unsigned long long) __entry->parent, __entry->datasync)
);
TRACE_EVENT(ext4_sync_file_exit,
@@ -996,7 +996,7 @@ TRACE_EVENT(ext4_sync_file_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, ret )
),
@@ -1006,9 +1006,9 @@ TRACE_EVENT(ext4_sync_file_exit,
__entry->ret = ret;
),
- TP_printk("dev %d,%d ino %lu ret %d",
+ TP_printk("dev %d,%d ino %llu ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->ret)
);
@@ -1040,7 +1040,7 @@ TRACE_EVENT(ext4_alloc_da_blocks,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( unsigned int, data_blocks )
),
@@ -1050,9 +1050,9 @@ TRACE_EVENT(ext4_alloc_da_blocks,
__entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
),
- TP_printk("dev %d,%d ino %lu reserved_data_blocks %u",
+ TP_printk("dev %d,%d ino %llu reserved_data_blocks %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->data_blocks)
);
@@ -1063,7 +1063,7 @@ TRACE_EVENT(ext4_mballoc_alloc,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u32, orig_logical )
__field( int, orig_start )
__field( __u32, orig_group )
@@ -1107,11 +1107,11 @@ TRACE_EVENT(ext4_mballoc_alloc,
__entry->cr = ac->ac_criteria;
),
- TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
+ TP_printk("dev %d,%d inode %llu orig %u/%d/%u@%u goal %u/%d/%u@%u "
"result %u/%d/%u@%u blks %u grps %u cr %s flags %s "
"tail %u broken %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->orig_group, __entry->orig_start,
__entry->orig_len, __entry->orig_logical,
__entry->goal_group, __entry->goal_start,
@@ -1130,7 +1130,7 @@ TRACE_EVENT(ext4_mballoc_prealloc,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u32, orig_logical )
__field( int, orig_start )
__field( __u32, orig_group )
@@ -1154,9 +1154,9 @@ TRACE_EVENT(ext4_mballoc_prealloc,
__entry->result_len = ac->ac_b_ex.fe_len;
),
- TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
+ TP_printk("dev %d,%d inode %llu orig %u/%d/%u@%u result %u/%d/%u@%u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->orig_group, __entry->orig_start,
__entry->orig_len, __entry->orig_logical,
__entry->result_group, __entry->result_start,
@@ -1174,7 +1174,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, result_start )
__field( __u32, result_group )
__field( int, result_len )
@@ -1188,9 +1188,9 @@ DECLARE_EVENT_CLASS(ext4__mballoc,
__entry->result_len = len;
),
- TP_printk("dev %d,%d inode %lu extent %u/%d/%d ",
+ TP_printk("dev %d,%d inode %llu extent %u/%d/%d ",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->result_group, __entry->result_start,
__entry->result_len)
);
@@ -1224,7 +1224,7 @@ TRACE_EVENT(ext4_forget,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, block )
__field( int, is_metadata )
__field( __u16, mode )
@@ -1238,9 +1238,9 @@ TRACE_EVENT(ext4_forget,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
+ TP_printk("dev %d,%d ino %llu mode 0%o is_metadata %d block %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->mode, __entry->is_metadata, __entry->block)
);
@@ -1251,7 +1251,7 @@ TRACE_EVENT(ext4_da_update_reserve_space,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, i_blocks )
__field( int, used_blocks )
__field( int, reserved_data_blocks )
@@ -1270,10 +1270,10 @@ TRACE_EVENT(ext4_da_update_reserve_space,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
+ TP_printk("dev %d,%d ino %llu mode 0%o i_blocks %llu used_blocks %d "
"reserved_data_blocks %d quota_claim %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->mode, __entry->i_blocks,
__entry->used_blocks, __entry->reserved_data_blocks,
__entry->quota_claim)
@@ -1286,7 +1286,7 @@ TRACE_EVENT(ext4_da_reserve_space,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, i_blocks )
__field( int, reserve_blocks )
__field( int, reserved_data_blocks )
@@ -1302,10 +1302,10 @@ TRACE_EVENT(ext4_da_reserve_space,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu reserve_blocks %d"
+ TP_printk("dev %d,%d ino %llu mode 0%o i_blocks %llu reserve_blocks %d"
"reserved_data_blocks %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->mode, __entry->i_blocks,
__entry->reserve_blocks, __entry->reserved_data_blocks)
);
@@ -1317,7 +1317,7 @@ TRACE_EVENT(ext4_da_release_space,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, i_blocks )
__field( int, freed_blocks )
__field( int, reserved_data_blocks )
@@ -1333,10 +1333,10 @@ TRACE_EVENT(ext4_da_release_space,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d "
+ TP_printk("dev %d,%d ino %llu mode 0%o i_blocks %llu freed_blocks %d "
"reserved_data_blocks %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->mode, __entry->i_blocks,
__entry->freed_blocks, __entry->reserved_data_blocks)
);
@@ -1413,7 +1413,7 @@ DECLARE_EVENT_CLASS(ext4__fallocate_mode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, offset )
__field( loff_t, len )
__field( int, mode )
@@ -1427,9 +1427,9 @@ DECLARE_EVENT_CLASS(ext4__fallocate_mode,
__entry->mode = mode;
),
- TP_printk("dev %d,%d ino %lu offset %lld len %lld mode %s",
+ TP_printk("dev %d,%d ino %llu offset %lld len %lld mode %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->offset, __entry->len,
show_falloc_mode(__entry->mode))
);
@@ -1463,7 +1463,7 @@ TRACE_EVENT(ext4_fallocate_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, pos )
__field( unsigned int, blocks )
__field( int, ret )
@@ -1477,9 +1477,9 @@ TRACE_EVENT(ext4_fallocate_exit,
__entry->ret = ret;
),
- TP_printk("dev %d,%d ino %lu pos %lld blocks %u ret %d",
+ TP_printk("dev %d,%d ino %llu pos %lld blocks %u ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->pos, __entry->blocks,
__entry->ret)
);
@@ -1491,8 +1491,8 @@ TRACE_EVENT(ext4_unlink_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
- __field( ino_t, parent )
+ __field( u64, ino )
+ __field( u64, parent )
__field( loff_t, size )
),
@@ -1503,10 +1503,10 @@ TRACE_EVENT(ext4_unlink_enter,
__entry->size = d_inode(dentry)->i_size;
),
- TP_printk("dev %d,%d ino %lu size %lld parent %lu",
+ TP_printk("dev %d,%d ino %llu size %lld parent %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->size,
- (unsigned long) __entry->parent)
+ (unsigned long long) __entry->ino, __entry->size,
+ (unsigned long long) __entry->parent)
);
TRACE_EVENT(ext4_unlink_exit,
@@ -1516,7 +1516,7 @@ TRACE_EVENT(ext4_unlink_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, ret )
),
@@ -1526,9 +1526,9 @@ TRACE_EVENT(ext4_unlink_exit,
__entry->ret = ret;
),
- TP_printk("dev %d,%d ino %lu ret %d",
+ TP_printk("dev %d,%d ino %llu ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->ret)
);
@@ -1539,7 +1539,7 @@ DECLARE_EVENT_CLASS(ext4__truncate,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, blocks )
),
@@ -1549,9 +1549,9 @@ DECLARE_EVENT_CLASS(ext4__truncate,
__entry->blocks = inode->i_blocks;
),
- TP_printk("dev %d,%d ino %lu blocks %llu",
+ TP_printk("dev %d,%d ino %llu blocks %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->blocks)
+ (unsigned long long) __entry->ino, __entry->blocks)
);
DEFINE_EVENT(ext4__truncate, ext4_truncate_enter,
@@ -1577,7 +1577,7 @@ TRACE_EVENT(ext4_ext_convert_to_initialized_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, m_lblk )
__field( unsigned, m_len )
__field( ext4_lblk_t, u_lblk )
@@ -1595,10 +1595,10 @@ TRACE_EVENT(ext4_ext_convert_to_initialized_enter,
__entry->u_pblk = ext4_ext_pblock(ux);
),
- TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u "
+ TP_printk("dev %d,%d ino %llu m_lblk %u m_len %u u_lblk %u u_len %u "
"u_pblk %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->m_lblk, __entry->m_len,
__entry->u_lblk, __entry->u_len, __entry->u_pblk)
);
@@ -1615,7 +1615,7 @@ TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, m_lblk )
__field( unsigned, m_len )
__field( ext4_lblk_t, u_lblk )
@@ -1639,11 +1639,11 @@ TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath,
__entry->i_pblk = ext4_ext_pblock(ix);
),
- TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u "
+ TP_printk("dev %d,%d ino %llu m_lblk %u m_len %u "
"u_lblk %u u_len %u u_pblk %llu "
"i_lblk %u i_len %u i_pblk %llu ",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->m_lblk, __entry->m_len,
__entry->u_lblk, __entry->u_len, __entry->u_pblk,
__entry->i_lblk, __entry->i_len, __entry->i_pblk)
@@ -1657,7 +1657,7 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
__field( unsigned int, len )
__field( unsigned int, flags )
@@ -1671,9 +1671,9 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_enter,
__entry->flags = flags;
),
- TP_printk("dev %d,%d ino %lu lblk %u len %u flags %s",
+ TP_printk("dev %d,%d ino %llu lblk %u len %u flags %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->len, show_map_flags(__entry->flags))
);
@@ -1699,7 +1699,7 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( unsigned int, flags )
__field( ext4_fsblk_t, pblk )
__field( ext4_lblk_t, lblk )
@@ -1719,10 +1719,10 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_exit,
__entry->ret = ret;
),
- TP_printk("dev %d,%d ino %lu flags %s lblk %u pblk %llu len %u "
+ TP_printk("dev %d,%d ino %llu flags %s lblk %u pblk %llu len %u "
"mflags %s ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
show_map_flags(__entry->flags), __entry->lblk, __entry->pblk,
__entry->len, show_mflags(__entry->mflags), __entry->ret)
);
@@ -1748,7 +1748,7 @@ TRACE_EVENT(ext4_ext_load_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_fsblk_t, pblk )
__field( ext4_lblk_t, lblk )
),
@@ -1760,9 +1760,9 @@ TRACE_EVENT(ext4_ext_load_extent,
__entry->lblk = lblk;
),
- TP_printk("dev %d,%d ino %lu lblk %u pblk %llu",
+ TP_printk("dev %d,%d ino %llu lblk %u pblk %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->pblk)
);
@@ -1773,7 +1773,7 @@ TRACE_EVENT(ext4_load_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
),
TP_fast_assign(
@@ -1781,9 +1781,9 @@ TRACE_EVENT(ext4_load_inode,
__entry->ino = ino;
),
- TP_printk("dev %d,%d ino %ld",
+ TP_printk("dev %d,%d ino %lld",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino)
+ (unsigned long long) __entry->ino)
);
TRACE_EVENT(ext4_journal_start_sb,
@@ -1823,7 +1823,7 @@ TRACE_EVENT(ext4_journal_start_inode,
TP_ARGS(inode, blocks, rsv_blocks, revoke_creds, type, IP),
TP_STRUCT__entry(
- __field( unsigned long, ino )
+ __field( u64, ino )
__field( dev_t, dev )
__field( unsigned long, ip )
__field( int, blocks )
@@ -1843,9 +1843,10 @@ TRACE_EVENT(ext4_journal_start_inode,
),
TP_printk("dev %d,%d blocks %d, rsv_blocks %d, revoke_creds %d,"
- " type %d, ino %lu, caller %pS", MAJOR(__entry->dev),
+ " type %d, ino %llu, caller %pS", MAJOR(__entry->dev),
MINOR(__entry->dev), __entry->blocks, __entry->rsv_blocks,
- __entry->revoke_creds, __entry->type, __entry->ino,
+ __entry->revoke_creds, __entry->type,
+ (unsigned long long) __entry->ino,
(void *)__entry->ip)
);
@@ -1928,7 +1929,7 @@ TRACE_EVENT(ext4_ext_handle_unwritten_extents,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, flags )
__field( ext4_lblk_t, lblk )
__field( ext4_fsblk_t, pblk )
@@ -1948,10 +1949,10 @@ TRACE_EVENT(ext4_ext_handle_unwritten_extents,
__entry->newblk = newblock;
),
- TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %s "
+ TP_printk("dev %d,%d ino %llu m_lblk %u m_pblk %llu m_len %u flags %s "
"allocated %d newblock %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->lblk, (unsigned long long) __entry->pblk,
__entry->len, show_map_flags(__entry->flags),
(unsigned int) __entry->allocated,
@@ -1995,7 +1996,7 @@ TRACE_EVENT(ext4_ext_show_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_fsblk_t, pblk )
__field( ext4_lblk_t, lblk )
__field( unsigned short, len )
@@ -2009,9 +2010,9 @@ TRACE_EVENT(ext4_ext_show_extent,
__entry->len = len;
),
- TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u",
+ TP_printk("dev %d,%d ino %llu lblk %u pblk %llu len %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->lblk,
(unsigned long long) __entry->pblk,
(unsigned short) __entry->len)
@@ -2026,7 +2027,7 @@ TRACE_EVENT(ext4_remove_blocks,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, from )
__field( ext4_lblk_t, to )
__field( ext4_fsblk_t, ee_pblk )
@@ -2050,10 +2051,10 @@ TRACE_EVENT(ext4_remove_blocks,
__entry->pc_state = pc->state;
),
- TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]"
+ TP_printk("dev %d,%d ino %llu extent [%u(%llu), %u]"
"from %u to %u partial [pclu %lld lblk %u state %d]",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->ee_lblk,
(unsigned long long) __entry->ee_pblk,
(unsigned short) __entry->ee_len,
@@ -2073,7 +2074,7 @@ TRACE_EVENT(ext4_ext_rm_leaf,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, start )
__field( ext4_lblk_t, ee_lblk )
__field( ext4_fsblk_t, ee_pblk )
@@ -2095,10 +2096,10 @@ TRACE_EVENT(ext4_ext_rm_leaf,
__entry->pc_state = pc->state;
),
- TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]"
+ TP_printk("dev %d,%d ino %llu start_lblk %u last_extent [%u(%llu), %u]"
"partial [pclu %lld lblk %u state %d]",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->start,
(unsigned) __entry->ee_lblk,
(unsigned long long) __entry->ee_pblk,
@@ -2115,7 +2116,7 @@ TRACE_EVENT(ext4_ext_rm_idx,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_fsblk_t, pblk )
),
@@ -2125,9 +2126,9 @@ TRACE_EVENT(ext4_ext_rm_idx,
__entry->pblk = pblk;
),
- TP_printk("dev %d,%d ino %lu index_pblk %llu",
+ TP_printk("dev %d,%d ino %llu index_pblk %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned long long) __entry->pblk)
);
@@ -2139,7 +2140,7 @@ TRACE_EVENT(ext4_ext_remove_space,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, start )
__field( ext4_lblk_t, end )
__field( int, depth )
@@ -2153,9 +2154,9 @@ TRACE_EVENT(ext4_ext_remove_space,
__entry->depth = depth;
),
- TP_printk("dev %d,%d ino %lu since %u end %u depth %d",
+ TP_printk("dev %d,%d ino %llu since %u end %u depth %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->start,
(unsigned) __entry->end,
__entry->depth)
@@ -2169,7 +2170,7 @@ TRACE_EVENT(ext4_ext_remove_space_done,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, start )
__field( ext4_lblk_t, end )
__field( int, depth )
@@ -2191,11 +2192,11 @@ TRACE_EVENT(ext4_ext_remove_space_done,
__entry->eh_entries = le16_to_cpu(eh_entries);
),
- TP_printk("dev %d,%d ino %lu since %u end %u depth %d "
+ TP_printk("dev %d,%d ino %llu since %u end %u depth %d "
"partial [pclu %lld lblk %u state %d] "
"remaining_entries %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->start,
(unsigned) __entry->end,
__entry->depth,
@@ -2212,7 +2213,7 @@ DECLARE_EVENT_CLASS(ext4__es_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
__field( ext4_lblk_t, len )
__field( ext4_fsblk_t, pblk )
@@ -2230,9 +2231,9 @@ DECLARE_EVENT_CLASS(ext4__es_extent,
__entry->seq = EXT4_I(inode)->i_es_seq;
),
- TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s seq %llu",
+ TP_printk("dev %d,%d ino %llu es [%u/%u) mapped %llu status %s seq %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->len,
__entry->pblk, show_extent_status(__entry->status),
__entry->seq)
@@ -2257,7 +2258,7 @@ TRACE_EVENT(ext4_es_remove_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, lblk )
__field( loff_t, len )
__field( u64, seq )
@@ -2271,9 +2272,9 @@ TRACE_EVENT(ext4_es_remove_extent,
__entry->seq = EXT4_I(inode)->i_es_seq;
),
- TP_printk("dev %d,%d ino %lu es [%lld/%lld) seq %llu",
+ TP_printk("dev %d,%d ino %llu es [%lld/%lld) seq %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->len, __entry->seq)
);
@@ -2284,7 +2285,7 @@ TRACE_EVENT(ext4_es_find_extent_range_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
),
@@ -2294,9 +2295,9 @@ TRACE_EVENT(ext4_es_find_extent_range_enter,
__entry->lblk = lblk;
),
- TP_printk("dev %d,%d ino %lu lblk %u",
+ TP_printk("dev %d,%d ino %llu lblk %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->lblk)
+ (unsigned long long) __entry->ino, __entry->lblk)
);
TRACE_EVENT(ext4_es_find_extent_range_exit,
@@ -2306,7 +2307,7 @@ TRACE_EVENT(ext4_es_find_extent_range_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
__field( ext4_lblk_t, len )
__field( ext4_fsblk_t, pblk )
@@ -2322,9 +2323,9 @@ TRACE_EVENT(ext4_es_find_extent_range_exit,
__entry->status = ext4_es_status(es);
),
- TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s",
+ TP_printk("dev %d,%d ino %llu es [%u/%u) mapped %llu status %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->len,
__entry->pblk, show_extent_status(__entry->status))
);
@@ -2336,7 +2337,7 @@ TRACE_EVENT(ext4_es_lookup_extent_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
),
@@ -2346,9 +2347,9 @@ TRACE_EVENT(ext4_es_lookup_extent_enter,
__entry->lblk = lblk;
),
- TP_printk("dev %d,%d ino %lu lblk %u",
+ TP_printk("dev %d,%d ino %llu lblk %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->lblk)
+ (unsigned long long) __entry->ino, __entry->lblk)
);
TRACE_EVENT(ext4_es_lookup_extent_exit,
@@ -2359,7 +2360,7 @@ TRACE_EVENT(ext4_es_lookup_extent_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
__field( ext4_lblk_t, len )
__field( ext4_fsblk_t, pblk )
@@ -2377,9 +2378,9 @@ TRACE_EVENT(ext4_es_lookup_extent_exit,
__entry->found = found;
),
- TP_printk("dev %d,%d ino %lu found %d [%u/%u) %llu %s",
+ TP_printk("dev %d,%d ino %llu found %d [%u/%u) %llu %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->found,
+ (unsigned long long) __entry->ino, __entry->found,
__entry->lblk, __entry->len,
__entry->found ? __entry->pblk : 0,
show_extent_status(__entry->found ? __entry->status : 0))
@@ -2448,7 +2449,7 @@ TRACE_EVENT(ext4_collapse_range,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, offset)
__field(loff_t, len)
),
@@ -2460,9 +2461,9 @@ TRACE_EVENT(ext4_collapse_range,
__entry->len = len;
),
- TP_printk("dev %d,%d ino %lu offset %lld len %lld",
+ TP_printk("dev %d,%d ino %llu offset %lld len %lld",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->offset, __entry->len)
);
@@ -2473,7 +2474,7 @@ TRACE_EVENT(ext4_insert_range,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, offset)
__field(loff_t, len)
),
@@ -2485,9 +2486,9 @@ TRACE_EVENT(ext4_insert_range,
__entry->len = len;
),
- TP_printk("dev %d,%d ino %lu offset %lld len %lld",
+ TP_printk("dev %d,%d ino %llu offset %lld len %lld",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->offset, __entry->len)
);
@@ -2527,7 +2528,7 @@ TRACE_EVENT(ext4_es_insert_delayed_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
__field( ext4_lblk_t, len )
__field( ext4_fsblk_t, pblk )
@@ -2549,9 +2550,9 @@ TRACE_EVENT(ext4_es_insert_delayed_extent,
__entry->seq = EXT4_I(inode)->i_es_seq;
),
- TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s allocated %d %d seq %llu",
+ TP_printk("dev %d,%d ino %llu es [%u/%u) mapped %llu status %s allocated %d %d seq %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->len,
__entry->pblk, show_extent_status(__entry->status),
__entry->lclu_allocated, __entry->end_allocated,
@@ -2877,7 +2878,7 @@ DECLARE_EVENT_CLASS(ext4_fc_track_dentry,
TP_STRUCT__entry(
__field(dev_t, dev)
__field(tid_t, t_tid)
- __field(ino_t, i_ino)
+ __field(u64, i_ino)
__field(tid_t, i_sync_tid)
__field(int, error)
),
@@ -2892,9 +2893,9 @@ DECLARE_EVENT_CLASS(ext4_fc_track_dentry,
__entry->error = ret;
),
- TP_printk("dev %d,%d, t_tid %u, ino %lu, i_sync_tid %u, error %d",
+ TP_printk("dev %d,%d, t_tid %u, ino %llu, i_sync_tid %u, error %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- __entry->t_tid, __entry->i_ino, __entry->i_sync_tid,
+ __entry->t_tid, (unsigned long long) __entry->i_ino, __entry->i_sync_tid,
__entry->error
)
);
@@ -2918,7 +2919,7 @@ TRACE_EVENT(ext4_fc_track_inode,
TP_STRUCT__entry(
__field(dev_t, dev)
__field(tid_t, t_tid)
- __field(ino_t, i_ino)
+ __field(u64, i_ino)
__field(tid_t, i_sync_tid)
__field(int, error)
),
@@ -2933,9 +2934,9 @@ TRACE_EVENT(ext4_fc_track_inode,
__entry->error = ret;
),
- TP_printk("dev %d:%d, t_tid %u, inode %lu, i_sync_tid %u, error %d",
+ TP_printk("dev %d:%d, t_tid %u, inode %llu, i_sync_tid %u, error %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- __entry->t_tid, __entry->i_ino, __entry->i_sync_tid,
+ __entry->t_tid, (unsigned long long) __entry->i_ino, __entry->i_sync_tid,
__entry->error)
);
@@ -2948,7 +2949,7 @@ TRACE_EVENT(ext4_fc_track_range,
TP_STRUCT__entry(
__field(dev_t, dev)
__field(tid_t, t_tid)
- __field(ino_t, i_ino)
+ __field(u64, i_ino)
__field(tid_t, i_sync_tid)
__field(long, start)
__field(long, end)
@@ -2967,9 +2968,9 @@ TRACE_EVENT(ext4_fc_track_range,
__entry->error = ret;
),
- TP_printk("dev %d:%d, t_tid %u, inode %lu, i_sync_tid %u, error %d, start %ld, end %ld",
+ TP_printk("dev %d:%d, t_tid %u, inode %llu, i_sync_tid %u, error %d, start %ld, end %ld",
MAJOR(__entry->dev), MINOR(__entry->dev),
- __entry->t_tid, __entry->i_ino, __entry->i_sync_tid,
+ __entry->t_tid, (unsigned long long) __entry->i_ino, __entry->i_sync_tid,
__entry->error, __entry->start, __entry->end)
);
@@ -3030,10 +3031,10 @@ TRACE_EVENT(ext4_move_extent_enter,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, orig_ino)
+ __field(u64, orig_ino)
__field(ext4_lblk_t, orig_lblk)
__field(unsigned int, orig_flags)
- __field(ino_t, donor_ino)
+ __field(u64, donor_ino)
__field(ext4_lblk_t, donor_lblk)
__field(unsigned int, len)
),
@@ -3048,11 +3049,11 @@ TRACE_EVENT(ext4_move_extent_enter,
__entry->len = orig_map->m_len;
),
- TP_printk("dev %d,%d origin ino %lu lblk %u flags %s donor ino %lu lblk %u len %u",
+ TP_printk("dev %d,%d origin ino %llu lblk %u flags %s donor ino %llu lblk %u len %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->orig_ino, __entry->orig_lblk,
+ (unsigned long long) __entry->orig_ino, __entry->orig_lblk,
show_mflags(__entry->orig_flags),
- (unsigned long) __entry->donor_ino, __entry->donor_lblk,
+ (unsigned long long) __entry->donor_ino, __entry->donor_lblk,
__entry->len)
);
@@ -3066,9 +3067,9 @@ TRACE_EVENT(ext4_move_extent_exit,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, orig_ino)
+ __field(u64, orig_ino)
__field(ext4_lblk_t, orig_lblk)
- __field(ino_t, donor_ino)
+ __field(u64, donor_ino)
__field(ext4_lblk_t, donor_lblk)
__field(unsigned int, m_len)
__field(u64, move_len)
@@ -3088,10 +3089,10 @@ TRACE_EVENT(ext4_move_extent_exit,
__entry->ret = ret;
),
- TP_printk("dev %d,%d origin ino %lu lblk %u donor ino %lu lblk %u m_len %u, move_len %llu type %d ret %d",
+ TP_printk("dev %d,%d origin ino %llu lblk %u donor ino %llu lblk %u m_len %u, move_len %llu type %d ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->orig_ino, __entry->orig_lblk,
- (unsigned long) __entry->donor_ino, __entry->donor_lblk,
+ (unsigned long long) __entry->orig_ino, __entry->orig_lblk,
+ (unsigned long long) __entry->donor_ino, __entry->donor_lblk,
__entry->m_len, __entry->move_len, __entry->move_type,
__entry->ret)
);
--
2.53.0
^ permalink raw reply related
* [PATCH 03/61] trace: update VFS-layer trace events for u64 i_ino
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Update trace event definitions in VFS-layer trace headers to use u64
instead of ino_t/unsigned long for inode number fields, and change
format strings from %lu/%lx to %llu/%llx to match.
This is needed because i_ino is now u64. Changing trace event field
types changes the binary trace format, but the self-describing format
metadata handles this transparently for modern trace-cmd and perf.
Files updated:
- cachefiles.h, filelock.h, filemap.h, fs_dax.h, fsverity.h,
hugetlbfs.h, netfs.h, readahead.h, timestamp.h, writeback.h
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
include/trace/events/cachefiles.h | 18 ++---
include/trace/events/filelock.h | 16 ++---
include/trace/events/filemap.h | 20 +++---
include/trace/events/fs_dax.h | 20 +++---
include/trace/events/fsverity.h | 30 ++++----
include/trace/events/hugetlbfs.h | 28 ++++----
include/trace/events/netfs.h | 4 +-
include/trace/events/readahead.h | 12 ++--
include/trace/events/timestamp.h | 12 ++--
include/trace/events/writeback.h | 148 +++++++++++++++++++-------------------
10 files changed, 154 insertions(+), 154 deletions(-)
diff --git a/include/trace/events/cachefiles.h b/include/trace/events/cachefiles.h
index a743b2a35ea7001447b3e05d41539cb88013bc7f..f967027711ee823f224abc1b8ab03f63da06ae6f 100644
--- a/include/trace/events/cachefiles.h
+++ b/include/trace/events/cachefiles.h
@@ -251,8 +251,8 @@ TRACE_EVENT(cachefiles_lookup,
TP_STRUCT__entry(
__field(unsigned int, obj)
__field(short, error)
- __field(unsigned long, dino)
- __field(unsigned long, ino)
+ __field(u64, dino)
+ __field(u64, ino)
),
TP_fast_assign(
@@ -263,7 +263,7 @@ TRACE_EVENT(cachefiles_lookup,
__entry->error = IS_ERR(de) ? PTR_ERR(de) : 0;
),
- TP_printk("o=%08x dB=%lx B=%lx e=%d",
+ TP_printk("o=%08x dB=%llx B=%llx e=%d",
__entry->obj, __entry->dino, __entry->ino, __entry->error)
);
@@ -579,7 +579,7 @@ TRACE_EVENT(cachefiles_mark_active,
/* Note that obj may be NULL */
TP_STRUCT__entry(
__field(unsigned int, obj)
- __field(ino_t, inode)
+ __field(u64, inode)
),
TP_fast_assign(
@@ -587,7 +587,7 @@ TRACE_EVENT(cachefiles_mark_active,
__entry->inode = inode->i_ino;
),
- TP_printk("o=%08x B=%lx",
+ TP_printk("o=%08x B=%llx",
__entry->obj, __entry->inode)
);
@@ -600,7 +600,7 @@ TRACE_EVENT(cachefiles_mark_failed,
/* Note that obj may be NULL */
TP_STRUCT__entry(
__field(unsigned int, obj)
- __field(ino_t, inode)
+ __field(u64, inode)
),
TP_fast_assign(
@@ -608,7 +608,7 @@ TRACE_EVENT(cachefiles_mark_failed,
__entry->inode = inode->i_ino;
),
- TP_printk("o=%08x B=%lx",
+ TP_printk("o=%08x B=%llx",
__entry->obj, __entry->inode)
);
@@ -621,7 +621,7 @@ TRACE_EVENT(cachefiles_mark_inactive,
/* Note that obj may be NULL */
TP_STRUCT__entry(
__field(unsigned int, obj)
- __field(ino_t, inode)
+ __field(u64, inode)
),
TP_fast_assign(
@@ -629,7 +629,7 @@ TRACE_EVENT(cachefiles_mark_inactive,
__entry->inode = inode->i_ino;
),
- TP_printk("o=%08x B=%lx",
+ TP_printk("o=%08x B=%llx",
__entry->obj, __entry->inode)
);
diff --git a/include/trace/events/filelock.h b/include/trace/events/filelock.h
index 370016c38a5bbc07d5ba6c102030b49c9eb6424d..41bc752616b25d6cd7955203e2c604029d0b440c 100644
--- a/include/trace/events/filelock.h
+++ b/include/trace/events/filelock.h
@@ -42,7 +42,7 @@ TRACE_EVENT(locks_get_lock_context,
TP_ARGS(inode, type, ctx),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(unsigned char, type)
__field(struct file_lock_context *, ctx)
@@ -55,7 +55,7 @@ TRACE_EVENT(locks_get_lock_context,
__entry->ctx = ctx;
),
- TP_printk("dev=0x%x:0x%x ino=0x%lx type=%s ctx=%p",
+ TP_printk("dev=0x%x:0x%x ino=0x%llx type=%s ctx=%p",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, show_fl_type(__entry->type), __entry->ctx)
);
@@ -67,7 +67,7 @@ DECLARE_EVENT_CLASS(filelock_lock,
TP_STRUCT__entry(
__field(struct file_lock *, fl)
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(struct file_lock_core *, blocker)
__field(fl_owner_t, owner)
@@ -93,7 +93,7 @@ DECLARE_EVENT_CLASS(filelock_lock,
__entry->ret = ret;
),
- TP_printk("fl=%p dev=0x%x:0x%x ino=0x%lx fl_blocker=%p fl_owner=%p fl_pid=%u fl_flags=%s fl_type=%s fl_start=%lld fl_end=%lld ret=%d",
+ TP_printk("fl=%p dev=0x%x:0x%x ino=0x%llx fl_blocker=%p fl_owner=%p fl_pid=%u fl_flags=%s fl_type=%s fl_start=%lld fl_end=%lld ret=%d",
__entry->fl, MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, __entry->blocker, __entry->owner,
__entry->pid, show_fl_flags(__entry->flags),
@@ -124,7 +124,7 @@ DECLARE_EVENT_CLASS(filelock_lease,
TP_STRUCT__entry(
__field(struct file_lease *, fl)
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(struct file_lock_core *, blocker)
__field(fl_owner_t, owner)
@@ -146,7 +146,7 @@ DECLARE_EVENT_CLASS(filelock_lease,
__entry->downgrade_time = fl ? fl->fl_downgrade_time : 0;
),
- TP_printk("fl=%p dev=0x%x:0x%x ino=0x%lx fl_blocker=%p fl_owner=%p fl_flags=%s fl_type=%s fl_break_time=%lu fl_downgrade_time=%lu",
+ TP_printk("fl=%p dev=0x%x:0x%x ino=0x%llx fl_blocker=%p fl_owner=%p fl_flags=%s fl_type=%s fl_break_time=%lu fl_downgrade_time=%lu",
__entry->fl, MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, __entry->blocker, __entry->owner,
show_fl_flags(__entry->flags),
@@ -175,7 +175,7 @@ TRACE_EVENT(generic_add_lease,
TP_ARGS(inode, fl),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(int, wcount)
__field(int, rcount)
__field(int, icount)
@@ -196,7 +196,7 @@ TRACE_EVENT(generic_add_lease,
__entry->type = fl->c.flc_type;
),
- TP_printk("dev=0x%x:0x%x ino=0x%lx wcount=%d rcount=%d icount=%d fl_owner=%p fl_flags=%s fl_type=%s",
+ TP_printk("dev=0x%x:0x%x ino=0x%llx wcount=%d rcount=%d icount=%d fl_owner=%p fl_flags=%s fl_type=%s",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, __entry->wcount, __entry->rcount,
__entry->icount, __entry->owner,
diff --git a/include/trace/events/filemap.h b/include/trace/events/filemap.h
index f48fe637bfd25885dc6daaf09336ab60626b4944..153491e57cce6df73e30ddee60a52ed7d8923c24 100644
--- a/include/trace/events/filemap.h
+++ b/include/trace/events/filemap.h
@@ -21,7 +21,7 @@ DECLARE_EVENT_CLASS(mm_filemap_op_page_cache,
TP_STRUCT__entry(
__field(unsigned long, pfn)
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(unsigned long, index)
__field(dev_t, s_dev)
__field(unsigned char, order)
@@ -38,7 +38,7 @@ DECLARE_EVENT_CLASS(mm_filemap_op_page_cache,
__entry->order = folio_order(folio);
),
- TP_printk("dev %d:%d ino %lx pfn=0x%lx ofs=%lu order=%u",
+ TP_printk("dev %d:%d ino %llx pfn=0x%lx ofs=%lu order=%u",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino,
__entry->pfn,
@@ -67,7 +67,7 @@ DECLARE_EVENT_CLASS(mm_filemap_op_page_cache_range,
TP_ARGS(mapping, index, last_index),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(unsigned long, index)
__field(unsigned long, last_index)
@@ -85,7 +85,7 @@ DECLARE_EVENT_CLASS(mm_filemap_op_page_cache_range,
),
TP_printk(
- "dev=%d:%d ino=%lx ofs=%lld-%lld",
+ "dev=%d:%d ino=%llx ofs=%lld-%lld",
MAJOR(__entry->s_dev),
MINOR(__entry->s_dev), __entry->i_ino,
((loff_t)__entry->index) << PAGE_SHIFT,
@@ -117,7 +117,7 @@ TRACE_EVENT(mm_filemap_fault,
TP_ARGS(mapping, index),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(unsigned long, index)
),
@@ -133,7 +133,7 @@ TRACE_EVENT(mm_filemap_fault,
),
TP_printk(
- "dev=%d:%d ino=%lx ofs=%lld",
+ "dev=%d:%d ino=%llx ofs=%lld",
MAJOR(__entry->s_dev),
MINOR(__entry->s_dev), __entry->i_ino,
((loff_t)__entry->index) << PAGE_SHIFT
@@ -146,7 +146,7 @@ TRACE_EVENT(filemap_set_wb_err,
TP_ARGS(mapping, eseq),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(errseq_t, errseq)
),
@@ -160,7 +160,7 @@ TRACE_EVENT(filemap_set_wb_err,
__entry->s_dev = mapping->host->i_rdev;
),
- TP_printk("dev=%d:%d ino=0x%lx errseq=0x%x",
+ TP_printk("dev=%d:%d ino=0x%llx errseq=0x%x",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, __entry->errseq)
);
@@ -172,7 +172,7 @@ TRACE_EVENT(file_check_and_advance_wb_err,
TP_STRUCT__entry(
__field(struct file *, file)
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(errseq_t, old)
__field(errseq_t, new)
@@ -191,7 +191,7 @@ TRACE_EVENT(file_check_and_advance_wb_err,
__entry->new = file->f_wb_err;
),
- TP_printk("file=%p dev=%d:%d ino=0x%lx old=0x%x new=0x%x",
+ TP_printk("file=%p dev=%d:%d ino=0x%llx old=0x%x new=0x%x",
__entry->file, MAJOR(__entry->s_dev),
MINOR(__entry->s_dev), __entry->i_ino, __entry->old,
__entry->new)
diff --git a/include/trace/events/fs_dax.h b/include/trace/events/fs_dax.h
index 50ebc1290ab062a9c30ab00049fb96691f9a0f23..11121baa8ece7928c653b4f874fb10ffbdd02fd0 100644
--- a/include/trace/events/fs_dax.h
+++ b/include/trace/events/fs_dax.h
@@ -12,7 +12,7 @@ DECLARE_EVENT_CLASS(dax_pmd_fault_class,
pgoff_t max_pgoff, int result),
TP_ARGS(inode, vmf, max_pgoff, result),
TP_STRUCT__entry(
- __field(unsigned long, ino)
+ __field(u64, ino)
__field(unsigned long, vm_start)
__field(unsigned long, vm_end)
__field(vm_flags_t, vm_flags)
@@ -35,7 +35,7 @@ DECLARE_EVENT_CLASS(dax_pmd_fault_class,
__entry->max_pgoff = max_pgoff;
__entry->result = result;
),
- TP_printk("dev %d:%d ino %#lx %s %s address %#lx vm_start "
+ TP_printk("dev %d:%d ino %#llx %s %s address %#lx vm_start "
"%#lx vm_end %#lx pgoff %#lx max_pgoff %#lx %s",
MAJOR(__entry->dev),
MINOR(__entry->dev),
@@ -66,7 +66,7 @@ DECLARE_EVENT_CLASS(dax_pmd_load_hole_class,
void *radix_entry),
TP_ARGS(inode, vmf, zero_folio, radix_entry),
TP_STRUCT__entry(
- __field(unsigned long, ino)
+ __field(u64, ino)
__field(vm_flags_t, vm_flags)
__field(unsigned long, address)
__field(struct folio *, zero_folio)
@@ -81,7 +81,7 @@ DECLARE_EVENT_CLASS(dax_pmd_load_hole_class,
__entry->zero_folio = zero_folio;
__entry->radix_entry = radix_entry;
),
- TP_printk("dev %d:%d ino %#lx %s address %#lx zero_folio %p "
+ TP_printk("dev %d:%d ino %#llx %s address %#lx zero_folio %p "
"radix_entry %#lx",
MAJOR(__entry->dev),
MINOR(__entry->dev),
@@ -106,7 +106,7 @@ DECLARE_EVENT_CLASS(dax_pte_fault_class,
TP_PROTO(struct inode *inode, struct vm_fault *vmf, int result),
TP_ARGS(inode, vmf, result),
TP_STRUCT__entry(
- __field(unsigned long, ino)
+ __field(u64, ino)
__field(vm_flags_t, vm_flags)
__field(unsigned long, address)
__field(pgoff_t, pgoff)
@@ -123,7 +123,7 @@ DECLARE_EVENT_CLASS(dax_pte_fault_class,
__entry->pgoff = vmf->pgoff;
__entry->result = result;
),
- TP_printk("dev %d:%d ino %#lx %s %s address %#lx pgoff %#lx %s",
+ TP_printk("dev %d:%d ino %#llx %s %s address %#lx pgoff %#lx %s",
MAJOR(__entry->dev),
MINOR(__entry->dev),
__entry->ino,
@@ -150,7 +150,7 @@ DECLARE_EVENT_CLASS(dax_writeback_range_class,
TP_PROTO(struct inode *inode, pgoff_t start_index, pgoff_t end_index),
TP_ARGS(inode, start_index, end_index),
TP_STRUCT__entry(
- __field(unsigned long, ino)
+ __field(u64, ino)
__field(pgoff_t, start_index)
__field(pgoff_t, end_index)
__field(dev_t, dev)
@@ -161,7 +161,7 @@ DECLARE_EVENT_CLASS(dax_writeback_range_class,
__entry->start_index = start_index;
__entry->end_index = end_index;
),
- TP_printk("dev %d:%d ino %#lx pgoff %#lx-%#lx",
+ TP_printk("dev %d:%d ino %#llx pgoff %#lx-%#lx",
MAJOR(__entry->dev),
MINOR(__entry->dev),
__entry->ino,
@@ -182,7 +182,7 @@ TRACE_EVENT(dax_writeback_one,
TP_PROTO(struct inode *inode, pgoff_t pgoff, pgoff_t pglen),
TP_ARGS(inode, pgoff, pglen),
TP_STRUCT__entry(
- __field(unsigned long, ino)
+ __field(u64, ino)
__field(pgoff_t, pgoff)
__field(pgoff_t, pglen)
__field(dev_t, dev)
@@ -193,7 +193,7 @@ TRACE_EVENT(dax_writeback_one,
__entry->pgoff = pgoff;
__entry->pglen = pglen;
),
- TP_printk("dev %d:%d ino %#lx pgoff %#lx pglen %#lx",
+ TP_printk("dev %d:%d ino %#llx pgoff %#lx pglen %#lx",
MAJOR(__entry->dev),
MINOR(__entry->dev),
__entry->ino,
diff --git a/include/trace/events/fsverity.h b/include/trace/events/fsverity.h
index a8c52f21cbd5eb010c7e7b2fdb8f9de49c8ea326..4477c17e05748360965c4e1840590efe96d6335e 100644
--- a/include/trace/events/fsverity.h
+++ b/include/trace/events/fsverity.h
@@ -16,7 +16,7 @@ TRACE_EVENT(fsverity_enable,
const struct merkle_tree_params *params),
TP_ARGS(inode, params),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(u64, data_size)
__field(u64, tree_size)
__field(unsigned int, merkle_block)
@@ -29,8 +29,8 @@ TRACE_EVENT(fsverity_enable,
__entry->merkle_block = params->block_size;
__entry->num_levels = params->num_levels;
),
- TP_printk("ino %lu data_size %llu tree_size %llu merkle_block %u levels %u",
- (unsigned long) __entry->ino,
+ TP_printk("ino %llu data_size %llu tree_size %llu merkle_block %u levels %u",
+ __entry->ino,
__entry->data_size,
__entry->tree_size,
__entry->merkle_block,
@@ -42,7 +42,7 @@ TRACE_EVENT(fsverity_tree_done,
const struct merkle_tree_params *params),
TP_ARGS(inode, vi, params),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(u64, data_size)
__field(u64, tree_size)
__field(unsigned int, merkle_block)
@@ -59,8 +59,8 @@ TRACE_EVENT(fsverity_tree_done,
memcpy(__get_dynamic_array(root_hash), vi->root_hash, __get_dynamic_array_len(root_hash));
memcpy(__get_dynamic_array(file_digest), vi->file_digest, __get_dynamic_array_len(file_digest));
),
- TP_printk("ino %lu data_size %llu tree_size %lld merkle_block %u levels %u root_hash %s digest %s",
- (unsigned long) __entry->ino,
+ TP_printk("ino %llu data_size %llu tree_size %lld merkle_block %u levels %u root_hash %s digest %s",
+ __entry->ino,
__entry->data_size,
__entry->tree_size,
__entry->merkle_block,
@@ -75,7 +75,7 @@ TRACE_EVENT(fsverity_verify_data_block,
u64 data_pos),
TP_ARGS(inode, params, data_pos),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(u64, data_pos)
__field(unsigned int, merkle_block)
),
@@ -84,8 +84,8 @@ TRACE_EVENT(fsverity_verify_data_block,
__entry->data_pos = data_pos;
__entry->merkle_block = params->block_size;
),
- TP_printk("ino %lu data_pos %llu merkle_block %u",
- (unsigned long) __entry->ino,
+ TP_printk("ino %llu data_pos %llu merkle_block %u",
+ __entry->ino,
__entry->data_pos,
__entry->merkle_block)
);
@@ -96,7 +96,7 @@ TRACE_EVENT(fsverity_merkle_hit,
unsigned int hidx),
TP_ARGS(inode, data_pos, hblock_idx, level, hidx),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(u64, data_pos)
__field(unsigned long, hblock_idx)
__field(unsigned int, level)
@@ -109,8 +109,8 @@ TRACE_EVENT(fsverity_merkle_hit,
__entry->level = level;
__entry->hidx = hidx;
),
- TP_printk("ino %lu data_pos %llu hblock_idx %lu level %u hidx %u",
- (unsigned long) __entry->ino,
+ TP_printk("ino %llu data_pos %llu hblock_idx %lu level %u hidx %u",
+ __entry->ino,
__entry->data_pos,
__entry->hblock_idx,
__entry->level,
@@ -122,7 +122,7 @@ TRACE_EVENT(fsverity_verify_merkle_block,
unsigned int level, unsigned int hidx),
TP_ARGS(inode, hblock_idx, level, hidx),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned long, hblock_idx)
__field(unsigned int, level)
__field(unsigned int, hidx)
@@ -133,8 +133,8 @@ TRACE_EVENT(fsverity_verify_merkle_block,
__entry->level = level;
__entry->hidx = hidx;
),
- TP_printk("ino %lu hblock_idx %lu level %u hidx %u",
- (unsigned long) __entry->ino,
+ TP_printk("ino %llu hblock_idx %lu level %u hidx %u",
+ __entry->ino,
__entry->hblock_idx,
__entry->level,
__entry->hidx)
diff --git a/include/trace/events/hugetlbfs.h b/include/trace/events/hugetlbfs.h
index 59605dfaeeb43d9e7657e338fdbe740e8486a286..d4fefa571b829f92729c7e175df9ad5ed701131a 100644
--- a/include/trace/events/hugetlbfs.h
+++ b/include/trace/events/hugetlbfs.h
@@ -15,8 +15,8 @@ TRACE_EVENT(hugetlbfs_alloc_inode,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
- __field(ino_t, dir)
+ __field(u64, ino)
+ __field(u64, 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,
@@ -41,7 +41,7 @@ DECLARE_EVENT_CLASS(hugetlbfs__inode,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(__u16, mode)
__field(loff_t, size)
__field(unsigned int, nlink)
@@ -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)
);
@@ -88,7 +88,7 @@ TRACE_EVENT(hugetlbfs_setattr,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned int, d_len)
__string(d_name, dentry->d_name.name)
__field(unsigned int, ia_valid)
@@ -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)
);
@@ -123,7 +123,7 @@ TRACE_EVENT(hugetlbfs_fallocate,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(int, mode)
__field(loff_t, offset)
__field(loff_t, len)
@@ -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,
diff --git a/include/trace/events/netfs.h b/include/trace/events/netfs.h
index 64a382fbc31a8421607417f29f71f6ded97223ce..6d701903779017e7a1eeb67ede2833e7134849bb 100644
--- a/include/trace/events/netfs.h
+++ b/include/trace/events/netfs.h
@@ -484,7 +484,7 @@ TRACE_EVENT(netfs_folio,
TP_ARGS(folio, why),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(pgoff_t, index)
__field(unsigned int, nr)
__field(enum netfs_folio_trace, why)
@@ -498,7 +498,7 @@ TRACE_EVENT(netfs_folio,
__entry->nr = folio_nr_pages(folio);
),
- TP_printk("i=%05lx ix=%05lx-%05lx %s",
+ TP_printk("i=%05llx ix=%05lx-%05lx %s",
__entry->ino, __entry->index, __entry->index + __entry->nr - 1,
__print_symbolic(__entry->why, netfs_folio_traces))
);
diff --git a/include/trace/events/readahead.h b/include/trace/events/readahead.h
index 0997ac5eceab1ac2de3b84b9d9d59cc338b9dd2b..928b2c67654735cc004d27beeee2066196e60a70 100644
--- a/include/trace/events/readahead.h
+++ b/include/trace/events/readahead.h
@@ -18,7 +18,7 @@ TRACE_EVENT(page_cache_ra_unbounded,
TP_ARGS(inode, index, nr_to_read, lookahead_size),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(pgoff_t, index)
__field(unsigned long, nr_to_read)
@@ -34,7 +34,7 @@ TRACE_EVENT(page_cache_ra_unbounded,
),
TP_printk(
- "dev=%d:%d ino=%lx index=%lu nr_to_read=%lu lookahead_size=%lu",
+ "dev=%d:%d ino=%llx index=%lu nr_to_read=%lu lookahead_size=%lu",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev), __entry->i_ino,
__entry->index, __entry->nr_to_read, __entry->lookahead_size
)
@@ -46,7 +46,7 @@ TRACE_EVENT(page_cache_ra_order,
TP_ARGS(inode, index, ra),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(pgoff_t, index)
__field(unsigned int, order)
@@ -66,7 +66,7 @@ TRACE_EVENT(page_cache_ra_order,
),
TP_printk(
- "dev=%d:%d ino=%lx index=%lu order=%u size=%u async_size=%u ra_pages=%u",
+ "dev=%d:%d ino=%llx index=%lu order=%u size=%u async_size=%u ra_pages=%u",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev), __entry->i_ino,
__entry->index, __entry->order, __entry->size,
__entry->async_size, __entry->ra_pages
@@ -80,7 +80,7 @@ DECLARE_EVENT_CLASS(page_cache_ra_op,
TP_ARGS(inode, index, ra, req_count),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(pgoff_t, index)
__field(unsigned int, order)
@@ -106,7 +106,7 @@ DECLARE_EVENT_CLASS(page_cache_ra_op,
),
TP_printk(
- "dev=%d:%d ino=%lx index=%lu req_count=%lu order=%u size=%u async_size=%u ra_pages=%u mmap_miss=%u prev_pos=%lld",
+ "dev=%d:%d ino=%llx index=%lu req_count=%lu order=%u size=%u async_size=%u ra_pages=%u mmap_miss=%u prev_pos=%lld",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev), __entry->i_ino,
__entry->index, __entry->req_count, __entry->order,
__entry->size, __entry->async_size, __entry->ra_pages,
diff --git a/include/trace/events/timestamp.h b/include/trace/events/timestamp.h
index c9e5ec930054887a6a7bae8e487611b5ded33d71..315ea8d57796617661768da24591d53095ac7649 100644
--- a/include/trace/events/timestamp.h
+++ b/include/trace/events/timestamp.h
@@ -19,7 +19,7 @@ DECLARE_EVENT_CLASS(ctime,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(time64_t, ctime_s)
__field(u32, ctime_ns)
__field(u32, gen)
@@ -33,7 +33,7 @@ DECLARE_EVENT_CLASS(ctime,
__entry->ctime_ns = ctime->tv_nsec;
),
- TP_printk("ino=%d:%d:%ld:%u ctime=%lld.%u",
+ TP_printk("ino=%d:%d:%llu:%u ctime=%lld.%u",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino, __entry->gen,
__entry->ctime_s, __entry->ctime_ns
)
@@ -59,7 +59,7 @@ TRACE_EVENT(ctime_ns_xchg,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(u32, gen)
__field(u32, old)
__field(u32, new)
@@ -75,7 +75,7 @@ TRACE_EVENT(ctime_ns_xchg,
__entry->cur = cur;
),
- TP_printk("ino=%d:%d:%ld:%u old=%u:%s new=%u cur=%u:%s",
+ TP_printk("ino=%d:%d:%llu:%u old=%u:%s new=%u cur=%u:%s",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino, __entry->gen,
__entry->old & ~I_CTIME_QUERIED,
__print_flags(__entry->old & I_CTIME_QUERIED, "|", CTIME_QUERIED_FLAGS),
@@ -94,7 +94,7 @@ TRACE_EVENT(fill_mg_cmtime,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(time64_t, ctime_s)
__field(time64_t, mtime_s)
__field(u32, ctime_ns)
@@ -112,7 +112,7 @@ TRACE_EVENT(fill_mg_cmtime,
__entry->mtime_ns = mtime->tv_nsec;
),
- TP_printk("ino=%d:%d:%ld:%u ctime=%lld.%u mtime=%lld.%u",
+ TP_printk("ino=%d:%d:%llu:%u ctime=%lld.%u mtime=%lld.%u",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino, __entry->gen,
__entry->ctime_s, __entry->ctime_ns,
__entry->mtime_s, __entry->mtime_ns
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 4d3d8c8f3a1bc3e5ef10fc96e3c6dbbd0cf00c98..cc7651749eb3ce1123cb3ea9496f0803a0f4c1a0 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -67,7 +67,7 @@ DECLARE_EVENT_CLASS(writeback_folio_template,
TP_STRUCT__entry (
__array(char, name, 32)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(pgoff_t, index)
),
@@ -79,9 +79,9 @@ DECLARE_EVENT_CLASS(writeback_folio_template,
__entry->index = folio->index;
),
- TP_printk("bdi %s: ino=%lu index=%lu",
+ TP_printk("bdi %s: ino=%llu index=%lu",
__entry->name,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
__entry->index
)
);
@@ -108,7 +108,7 @@ DECLARE_EVENT_CLASS(writeback_dirty_inode_template,
TP_STRUCT__entry (
__array(char, name, 32)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned long, state)
__field(unsigned long, flags)
),
@@ -123,9 +123,9 @@ DECLARE_EVENT_CLASS(writeback_dirty_inode_template,
__entry->flags = flags;
),
- TP_printk("bdi %s: ino=%lu state=%s flags=%s",
+ TP_printk("bdi %s: ino=%llu state=%s flags=%s",
__entry->name,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
show_inode_state(__entry->state),
show_inode_state(__entry->flags)
)
@@ -155,12 +155,12 @@ DEFINE_EVENT(writeback_dirty_inode_template, writeback_dirty_inode,
#ifdef CREATE_TRACE_POINTS
#ifdef CONFIG_CGROUP_WRITEBACK
-static inline ino_t __trace_wb_assign_cgroup(struct bdi_writeback *wb)
+static inline u64 __trace_wb_assign_cgroup(struct bdi_writeback *wb)
{
return cgroup_ino(wb->memcg_css->cgroup);
}
-static inline ino_t __trace_wbc_assign_cgroup(struct writeback_control *wbc)
+static inline u64 __trace_wbc_assign_cgroup(struct writeback_control *wbc)
{
if (wbc->wb)
return __trace_wb_assign_cgroup(wbc->wb);
@@ -169,12 +169,12 @@ static inline ino_t __trace_wbc_assign_cgroup(struct writeback_control *wbc)
}
#else /* CONFIG_CGROUP_WRITEBACK */
-static inline ino_t __trace_wb_assign_cgroup(struct bdi_writeback *wb)
+static inline u64 __trace_wb_assign_cgroup(struct bdi_writeback *wb)
{
return 1;
}
-static inline ino_t __trace_wbc_assign_cgroup(struct writeback_control *wbc)
+static inline u64 __trace_wbc_assign_cgroup(struct writeback_control *wbc)
{
return 1;
}
@@ -192,8 +192,8 @@ TRACE_EVENT(inode_foreign_history,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, ino)
- __field(ino_t, cgroup_ino)
+ __field(u64, ino)
+ __field(u64, cgroup_ino)
__field(unsigned int, history)
),
@@ -204,10 +204,10 @@ TRACE_EVENT(inode_foreign_history,
__entry->history = history;
),
- TP_printk("bdi %s: ino=%lu cgroup_ino=%lu history=0x%x",
+ TP_printk("bdi %s: ino=%llu cgroup_ino=%llu history=0x%x",
__entry->name,
- (unsigned long)__entry->ino,
- (unsigned long)__entry->cgroup_ino,
+ (unsigned long long)__entry->ino,
+ (unsigned long long)__entry->cgroup_ino,
__entry->history
)
);
@@ -221,8 +221,8 @@ TRACE_EVENT(inode_switch_wbs_queue,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, old_cgroup_ino)
- __field(ino_t, new_cgroup_ino)
+ __field(u64, old_cgroup_ino)
+ __field(u64, new_cgroup_ino)
__field(unsigned int, count)
),
@@ -233,10 +233,10 @@ TRACE_EVENT(inode_switch_wbs_queue,
__entry->count = count;
),
- TP_printk("bdi %s: old_cgroup_ino=%lu new_cgroup_ino=%lu count=%u",
+ TP_printk("bdi %s: old_cgroup_ino=%llu new_cgroup_ino=%llu count=%u",
__entry->name,
- (unsigned long)__entry->old_cgroup_ino,
- (unsigned long)__entry->new_cgroup_ino,
+ (unsigned long long)__entry->old_cgroup_ino,
+ (unsigned long long)__entry->new_cgroup_ino,
__entry->count
)
);
@@ -250,9 +250,9 @@ TRACE_EVENT(inode_switch_wbs,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, ino)
- __field(ino_t, old_cgroup_ino)
- __field(ino_t, new_cgroup_ino)
+ __field(u64, ino)
+ __field(u64, old_cgroup_ino)
+ __field(u64, new_cgroup_ino)
),
TP_fast_assign(
@@ -262,11 +262,11 @@ TRACE_EVENT(inode_switch_wbs,
__entry->new_cgroup_ino = __trace_wb_assign_cgroup(new_wb);
),
- TP_printk("bdi %s: ino=%lu old_cgroup_ino=%lu new_cgroup_ino=%lu",
+ TP_printk("bdi %s: ino=%llu old_cgroup_ino=%llu new_cgroup_ino=%llu",
__entry->name,
- (unsigned long)__entry->ino,
- (unsigned long)__entry->old_cgroup_ino,
- (unsigned long)__entry->new_cgroup_ino
+ (unsigned long long)__entry->ino,
+ (unsigned long long)__entry->old_cgroup_ino,
+ (unsigned long long)__entry->new_cgroup_ino
)
);
@@ -279,10 +279,10 @@ TRACE_EVENT(track_foreign_dirty,
TP_STRUCT__entry(
__array(char, name, 32)
__field(u64, bdi_id)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned int, memcg_id)
- __field(ino_t, cgroup_ino)
- __field(ino_t, page_cgroup_ino)
+ __field(u64, cgroup_ino)
+ __field(u64, page_cgroup_ino)
),
TP_fast_assign(
@@ -297,13 +297,13 @@ TRACE_EVENT(track_foreign_dirty,
__entry->page_cgroup_ino = cgroup_ino(folio_memcg(folio)->css.cgroup);
),
- TP_printk("bdi %s[%llu]: ino=%lu memcg_id=%u cgroup_ino=%lu page_cgroup_ino=%lu",
+ TP_printk("bdi %s[%llu]: ino=%llu memcg_id=%u cgroup_ino=%llu page_cgroup_ino=%llu",
__entry->name,
__entry->bdi_id,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
__entry->memcg_id,
- (unsigned long)__entry->cgroup_ino,
- (unsigned long)__entry->page_cgroup_ino
+ (unsigned long long)__entry->cgroup_ino,
+ (unsigned long long)__entry->page_cgroup_ino
)
);
@@ -316,7 +316,7 @@ TRACE_EVENT(flush_foreign,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
__field(unsigned int, frn_bdi_id)
__field(unsigned int, frn_memcg_id)
),
@@ -328,9 +328,9 @@ TRACE_EVENT(flush_foreign,
__entry->frn_memcg_id = frn_memcg_id;
),
- TP_printk("bdi %s: cgroup_ino=%lu frn_bdi_id=%u frn_memcg_id=%u",
+ TP_printk("bdi %s: cgroup_ino=%llu frn_bdi_id=%u frn_memcg_id=%u",
__entry->name,
- (unsigned long)__entry->cgroup_ino,
+ (unsigned long long)__entry->cgroup_ino,
__entry->frn_bdi_id,
__entry->frn_memcg_id
)
@@ -345,9 +345,9 @@ DECLARE_EVENT_CLASS(writeback_write_inode_template,
TP_STRUCT__entry (
__array(char, name, 32)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(int, sync_mode)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -358,11 +358,11 @@ DECLARE_EVENT_CLASS(writeback_write_inode_template,
__entry->cgroup_ino = __trace_wbc_assign_cgroup(wbc);
),
- TP_printk("bdi %s: ino=%lu sync_mode=%d cgroup_ino=%lu",
+ TP_printk("bdi %s: ino=%llu sync_mode=%d cgroup_ino=%llu",
__entry->name,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
__entry->sync_mode,
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -392,7 +392,7 @@ DECLARE_EVENT_CLASS(writeback_work_class,
__field(int, range_cyclic)
__field(int, for_background)
__field(int, reason)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
strscpy_pad(__entry->name, bdi_dev_name(wb->bdi), 32);
@@ -406,7 +406,7 @@ DECLARE_EVENT_CLASS(writeback_work_class,
__entry->cgroup_ino = __trace_wb_assign_cgroup(wb);
),
TP_printk("bdi %s: sb_dev %d:%d nr_pages=%ld sync_mode=%d "
- "kupdate=%d range_cyclic=%d background=%d reason=%s cgroup_ino=%lu",
+ "kupdate=%d range_cyclic=%d background=%d reason=%s cgroup_ino=%llu",
__entry->name,
MAJOR(__entry->sb_dev), MINOR(__entry->sb_dev),
__entry->nr_pages,
@@ -415,7 +415,7 @@ DECLARE_EVENT_CLASS(writeback_work_class,
__entry->range_cyclic,
__entry->for_background,
__print_symbolic(__entry->reason, WB_WORK_REASON),
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
#define DEFINE_WRITEBACK_WORK_EVENT(name) \
@@ -445,15 +445,15 @@ DECLARE_EVENT_CLASS(writeback_class,
TP_ARGS(wb),
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
strscpy_pad(__entry->name, bdi_dev_name(wb->bdi), 32);
__entry->cgroup_ino = __trace_wb_assign_cgroup(wb);
),
- TP_printk("bdi %s: cgroup_ino=%lu",
+ TP_printk("bdi %s: cgroup_ino=%llu",
__entry->name,
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
#define DEFINE_WRITEBACK_EVENT(name) \
@@ -490,7 +490,7 @@ DECLARE_EVENT_CLASS(wbc_class,
__field(int, range_cyclic)
__field(long, range_start)
__field(long, range_end)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -507,7 +507,7 @@ DECLARE_EVENT_CLASS(wbc_class,
),
TP_printk("bdi %s: towrt=%ld skip=%ld mode=%d kupd=%d bgrd=%d "
- "cyclic=%d start=0x%lx end=0x%lx cgroup_ino=%lu",
+ "cyclic=%d start=0x%lx end=0x%lx cgroup_ino=%llu",
__entry->name,
__entry->nr_to_write,
__entry->pages_skipped,
@@ -517,7 +517,7 @@ DECLARE_EVENT_CLASS(wbc_class,
__entry->range_cyclic,
__entry->range_start,
__entry->range_end,
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
)
@@ -539,7 +539,7 @@ TRACE_EVENT(writeback_queue_io,
__field(long, age)
__field(int, moved)
__field(int, reason)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
strscpy_pad(__entry->name, bdi_dev_name(wb->bdi), 32);
@@ -549,13 +549,13 @@ TRACE_EVENT(writeback_queue_io,
__entry->reason = work->reason;
__entry->cgroup_ino = __trace_wb_assign_cgroup(wb);
),
- TP_printk("bdi %s: older=%lu age=%ld enqueue=%d reason=%s cgroup_ino=%lu",
+ TP_printk("bdi %s: older=%lu age=%ld enqueue=%d reason=%s cgroup_ino=%llu",
__entry->name,
__entry->older, /* dirtied_before in jiffies */
__entry->age, /* dirtied_before in relative milliseconds */
__entry->moved,
__print_symbolic(__entry->reason, WB_WORK_REASON),
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -620,7 +620,7 @@ TRACE_EVENT(bdi_dirty_ratelimit,
__field(unsigned long, dirty_ratelimit)
__field(unsigned long, task_ratelimit)
__field(unsigned long, balanced_dirty_ratelimit)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -638,7 +638,7 @@ TRACE_EVENT(bdi_dirty_ratelimit,
TP_printk("bdi %s: "
"write_bw=%lu awrite_bw=%lu dirty_rate=%lu "
"dirty_ratelimit=%lu task_ratelimit=%lu "
- "balanced_dirty_ratelimit=%lu cgroup_ino=%lu",
+ "balanced_dirty_ratelimit=%lu cgroup_ino=%llu",
__entry->bdi,
__entry->write_bw, /* write bandwidth */
__entry->avg_write_bw, /* avg write bandwidth */
@@ -646,7 +646,7 @@ TRACE_EVENT(bdi_dirty_ratelimit,
__entry->dirty_ratelimit, /* base ratelimit */
__entry->task_ratelimit, /* ratelimit with position control */
__entry->balanced_dirty_ratelimit, /* the balanced ratelimit */
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -680,7 +680,7 @@ TRACE_EVENT(balance_dirty_pages,
__field( long, pause)
__field(unsigned long, period)
__field( long, think)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -711,7 +711,7 @@ TRACE_EVENT(balance_dirty_pages,
"wb_setpoint=%lu wb_dirty=%lu "
"dirty_ratelimit=%lu task_ratelimit=%lu "
"dirtied=%u dirtied_pause=%u "
- "paused=%lu pause=%ld period=%lu think=%ld cgroup_ino=%lu",
+ "paused=%lu pause=%ld period=%lu think=%ld cgroup_ino=%llu",
__entry->bdi,
__entry->limit,
__entry->setpoint,
@@ -726,7 +726,7 @@ TRACE_EVENT(balance_dirty_pages,
__entry->pause, /* ms */
__entry->period, /* ms */
__entry->think, /* ms */
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -737,10 +737,10 @@ TRACE_EVENT(writeback_sb_inodes_requeue,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned long, state)
__field(unsigned long, dirtied_when)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -752,13 +752,13 @@ TRACE_EVENT(writeback_sb_inodes_requeue,
__entry->cgroup_ino = __trace_wb_assign_cgroup(inode_to_wb(inode));
),
- TP_printk("bdi %s: ino=%lu state=%s dirtied_when=%lu age=%lu cgroup_ino=%lu",
+ TP_printk("bdi %s: ino=%llu state=%s dirtied_when=%lu age=%lu cgroup_ino=%llu",
__entry->name,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
show_inode_state(__entry->state),
__entry->dirtied_when,
(jiffies - __entry->dirtied_when) / HZ,
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -773,13 +773,13 @@ DECLARE_EVENT_CLASS(writeback_single_inode_template,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned long, state)
__field(unsigned long, dirtied_when)
__field(unsigned long, writeback_index)
__field(long, nr_to_write)
__field(unsigned long, wrote)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -794,17 +794,17 @@ DECLARE_EVENT_CLASS(writeback_single_inode_template,
__entry->cgroup_ino = __trace_wbc_assign_cgroup(wbc);
),
- TP_printk("bdi %s: ino=%lu state=%s dirtied_when=%lu age=%lu "
- "index=%lu to_write=%ld wrote=%lu cgroup_ino=%lu",
+ TP_printk("bdi %s: ino=%llu state=%s dirtied_when=%lu age=%lu "
+ "index=%lu to_write=%ld wrote=%lu cgroup_ino=%llu",
__entry->name,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
show_inode_state(__entry->state),
__entry->dirtied_when,
(jiffies - __entry->dirtied_when) / HZ,
__entry->writeback_index,
__entry->nr_to_write,
__entry->wrote,
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -829,7 +829,7 @@ DECLARE_EVENT_CLASS(writeback_inode_template,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field(unsigned long, state )
__field( __u16, mode )
__field(unsigned long, dirtied_when )
@@ -843,9 +843,9 @@ DECLARE_EVENT_CLASS(writeback_inode_template,
__entry->dirtied_when = inode->dirtied_when;
),
- TP_printk("dev %d,%d ino %lu dirtied %lu state %s mode 0%o",
+ TP_printk("dev %d,%d ino %llu dirtied %lu state %s mode 0%o",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long)__entry->ino, __entry->dirtied_when,
+ (unsigned long long)__entry->ino, __entry->dirtied_when,
show_inode_state(__entry->state), __entry->mode)
);
--
2.53.0
^ permalink raw reply related
* [PATCH 02/61] vfs: change i_ino from unsigned long to u64
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Change the type of i_ino in struct inode from unsigned long to u64.
On 64-bit architectures, unsigned long is already 64 bits, so this is
effectively a type alias change with no runtime impact. On 32-bit
architectures, this widens i_ino from 32 to 64 bits, allowing
filesystems like NFS, CIFS, XFS, Ceph, and FUSE to store their native
64-bit inode numbers without folding/hashing.
The VFS already handles 64-bit inode numbers in kstat.ino (u64) and
statx.stx_ino (__u64). The existing overflow checks in cp_new_stat(),
cp_old_stat(), and cp_compat_stat() handle narrowing to 32-bit st_ino
with -EOVERFLOW, so userspace ABI is preserved.
struct inode will grow by 4 bytes on 32-bit architectures.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
include/linux/fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index dfa1f475b1c480c503ab6f00e891aa9b051607fa..097443bf12e289c347651e5f3da5b67eb6b53121 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -783,7 +783,7 @@ struct inode {
#endif
/* Stat data, not accessed from path walking */
- unsigned long i_ino;
+ u64 i_ino;
/*
* Filesystems may only read i_nlink directly. They shall use the
* following functions for modification:
--
2.53.0
^ permalink raw reply related
* [PATCH 01/61] vfs: widen inode hash/lookup functions to u64
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Change the inode hash/lookup VFS API functions to accept u64 parameters
instead of unsigned long for inode numbers and hash values. This is
preparation for widening i_ino itself to u64, which will allow
filesystems to store full 64-bit inode numbers on 32-bit architectures.
Since unsigned long implicitly widens to u64 on all architectures, this
change is backward-compatible with all existing callers.
Functions updated:
- hash(), find_inode_fast(), find_inode_by_ino_rcu(), test_inode_iunique()
- __insert_inode_hash(), iget_locked(), iget5_locked(), iget5_locked_rcu()
- ilookup(), ilookup5(), ilookup5_nowait()
- find_inode_nowait(), find_inode_rcu()
- inode_insert5(), insert_inode_locked4()
- insert_inode_locked() (local variable)
- dump_mapping() (local variable and format string)
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/inode.c | 46 +++++++++++++++++++++++-----------------------
include/linux/fs.h | 26 +++++++++++++-------------
2 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index cc12b68e021b2c97cc88a46ddc736334ecb8edfa..2cabec9043e8176d20aecc5ce7e0f276c114f122 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -672,7 +672,7 @@ static inline void inode_sb_list_del(struct inode *inode)
}
}
-static unsigned long hash(struct super_block *sb, unsigned long hashval)
+static unsigned long hash(struct super_block *sb, u64 hashval)
{
unsigned long tmp;
@@ -685,12 +685,12 @@ static unsigned long hash(struct super_block *sb, unsigned long hashval)
/**
* __insert_inode_hash - hash an inode
* @inode: unhashed inode
- * @hashval: unsigned long value used to locate this object in the
+ * @hashval: u64 value used to locate this object in the
* inode_hashtable.
*
* Add an inode to the inode hash for this superblock.
*/
-void __insert_inode_hash(struct inode *inode, unsigned long hashval)
+void __insert_inode_hash(struct inode *inode, u64 hashval)
{
struct hlist_head *b = inode_hashtable + hash(inode->i_sb, hashval);
@@ -726,7 +726,7 @@ void dump_mapping(const struct address_space *mapping)
struct dentry *dentry_ptr;
struct dentry dentry;
char fname[64] = {};
- unsigned long ino;
+ u64 ino;
/*
* If mapping is an invalid pointer, we don't want to crash
@@ -750,14 +750,14 @@ void dump_mapping(const struct address_space *mapping)
}
if (!dentry_first) {
- pr_warn("aops:%ps ino:%lx\n", a_ops, ino);
+ pr_warn("aops:%ps ino:%llx\n", a_ops, ino);
return;
}
dentry_ptr = container_of(dentry_first, struct dentry, d_u.d_alias);
if (get_kernel_nofault(dentry, dentry_ptr) ||
!dentry.d_parent || !dentry.d_name.name) {
- pr_warn("aops:%ps ino:%lx invalid dentry:%px\n",
+ pr_warn("aops:%ps ino:%llx invalid dentry:%px\n",
a_ops, ino, dentry_ptr);
return;
}
@@ -768,7 +768,7 @@ void dump_mapping(const struct address_space *mapping)
* Even if strncpy_from_kernel_nofault() succeeded,
* the fname could be unreliable
*/
- pr_warn("aops:%ps ino:%lx dentry name(?):\"%s\"\n",
+ pr_warn("aops:%ps ino:%llx dentry name(?):\"%s\"\n",
a_ops, ino, fname);
}
@@ -1087,7 +1087,7 @@ static struct inode *find_inode(struct super_block *sb,
* iget_locked for details.
*/
static struct inode *find_inode_fast(struct super_block *sb,
- struct hlist_head *head, unsigned long ino,
+ struct hlist_head *head, u64 ino,
bool hash_locked, bool *isnew)
{
struct inode *inode = NULL;
@@ -1301,7 +1301,7 @@ EXPORT_SYMBOL(unlock_two_nondirectories);
* Note that both @test and @set are called with the inode_hash_lock held, so
* they can't sleep.
*/
-struct inode *inode_insert5(struct inode *inode, unsigned long hashval,
+struct inode *inode_insert5(struct inode *inode, u64 hashval,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *data)
{
@@ -1378,7 +1378,7 @@ EXPORT_SYMBOL(inode_insert5);
* Note that both @test and @set are called with the inode_hash_lock held, so
* they can't sleep.
*/
-struct inode *iget5_locked(struct super_block *sb, unsigned long hashval,
+struct inode *iget5_locked(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *data)
{
@@ -1408,7 +1408,7 @@ EXPORT_SYMBOL(iget5_locked);
* This is equivalent to iget5_locked, except the @test callback must
* tolerate the inode not being stable, including being mid-teardown.
*/
-struct inode *iget5_locked_rcu(struct super_block *sb, unsigned long hashval,
+struct inode *iget5_locked_rcu(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *data)
{
@@ -1455,7 +1455,7 @@ EXPORT_SYMBOL_GPL(iget5_locked_rcu);
* hashed, and with the I_NEW flag set. The file system gets to fill it in
* before unlocking it via unlock_new_inode().
*/
-struct inode *iget_locked(struct super_block *sb, unsigned long ino)
+struct inode *iget_locked(struct super_block *sb, u64 ino)
{
struct hlist_head *head = inode_hashtable + hash(sb, ino);
struct inode *inode;
@@ -1527,7 +1527,7 @@ EXPORT_SYMBOL(iget_locked);
*
* Returns 1 if the inode number is unique, 0 if it is not.
*/
-static int test_inode_iunique(struct super_block *sb, unsigned long ino)
+static int test_inode_iunique(struct super_block *sb, u64 ino)
{
struct hlist_head *b = inode_hashtable + hash(sb, ino);
struct inode *inode;
@@ -1616,7 +1616,7 @@ EXPORT_SYMBOL(igrab);
*
* Note2: @test is called with the inode_hash_lock held, so can't sleep.
*/
-struct inode *ilookup5_nowait(struct super_block *sb, unsigned long hashval,
+struct inode *ilookup5_nowait(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *), void *data, bool *isnew)
{
struct hlist_head *head = inode_hashtable + hash(sb, hashval);
@@ -1647,7 +1647,7 @@ EXPORT_SYMBOL(ilookup5_nowait);
*
* Note: @test is called with the inode_hash_lock held, so can't sleep.
*/
-struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
+struct inode *ilookup5(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *), void *data)
{
struct inode *inode;
@@ -1677,7 +1677,7 @@ EXPORT_SYMBOL(ilookup5);
* Search for the inode @ino in the inode cache, and if the inode is in the
* cache, the inode is returned with an incremented reference count.
*/
-struct inode *ilookup(struct super_block *sb, unsigned long ino)
+struct inode *ilookup(struct super_block *sb, u64 ino)
{
struct hlist_head *head = inode_hashtable + hash(sb, ino);
struct inode *inode;
@@ -1726,8 +1726,8 @@ EXPORT_SYMBOL(ilookup);
* very carefully implemented.
*/
struct inode *find_inode_nowait(struct super_block *sb,
- unsigned long hashval,
- int (*match)(struct inode *, unsigned long,
+ u64 hashval,
+ int (*match)(struct inode *, u64,
void *),
void *data)
{
@@ -1773,7 +1773,7 @@ EXPORT_SYMBOL(find_inode_nowait);
*
* The caller must hold the RCU read lock.
*/
-struct inode *find_inode_rcu(struct super_block *sb, unsigned long hashval,
+struct inode *find_inode_rcu(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *), void *data)
{
struct hlist_head *head = inode_hashtable + hash(sb, hashval);
@@ -1812,7 +1812,7 @@ EXPORT_SYMBOL(find_inode_rcu);
* The caller must hold the RCU read lock.
*/
struct inode *find_inode_by_ino_rcu(struct super_block *sb,
- unsigned long ino)
+ u64 ino)
{
struct hlist_head *head = inode_hashtable + hash(sb, ino);
struct inode *inode;
@@ -1833,7 +1833,7 @@ EXPORT_SYMBOL(find_inode_by_ino_rcu);
int insert_inode_locked(struct inode *inode)
{
struct super_block *sb = inode->i_sb;
- ino_t ino = inode->i_ino;
+ u64 ino = inode->i_ino;
struct hlist_head *head = inode_hashtable + hash(sb, ino);
bool isnew;
@@ -1884,7 +1884,7 @@ int insert_inode_locked(struct inode *inode)
}
EXPORT_SYMBOL(insert_inode_locked);
-int insert_inode_locked4(struct inode *inode, unsigned long hashval,
+int insert_inode_locked4(struct inode *inode, u64 hashval,
int (*test)(struct inode *, void *), void *data)
{
struct inode *old;
@@ -2642,7 +2642,7 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
break;
default:
printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o) for"
- " inode %s:%lu\n", mode, inode->i_sb->s_id,
+ " inode %s:%llu\n", mode, inode->i_sb->s_id,
inode->i_ino);
break;
}
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 8b3dd145b25ec12b00ac1df17a952d9116b88047..dfa1f475b1c480c503ab6f00e891aa9b051607fa 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2935,32 +2935,32 @@ static inline int inode_generic_drop(struct inode *inode)
extern void d_mark_dontcache(struct inode *inode);
extern struct inode *ilookup5_nowait(struct super_block *sb,
- unsigned long hashval, int (*test)(struct inode *, void *),
+ u64 hashval, int (*test)(struct inode *, void *),
void *data, bool *isnew);
-extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
+extern struct inode *ilookup5(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *), void *data);
-extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
+extern struct inode *ilookup(struct super_block *sb, u64 ino);
-extern struct inode *inode_insert5(struct inode *inode, unsigned long hashval,
+extern struct inode *inode_insert5(struct inode *inode, u64 hashval,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *),
void *data);
-struct inode *iget5_locked(struct super_block *, unsigned long,
+struct inode *iget5_locked(struct super_block *, u64,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *);
-struct inode *iget5_locked_rcu(struct super_block *, unsigned long,
+struct inode *iget5_locked_rcu(struct super_block *, u64,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *);
-extern struct inode * iget_locked(struct super_block *, unsigned long);
+extern struct inode *iget_locked(struct super_block *, u64);
extern struct inode *find_inode_nowait(struct super_block *,
- unsigned long,
+ u64,
int (*match)(struct inode *,
- unsigned long, void *),
+ u64, void *),
void *data);
-extern struct inode *find_inode_rcu(struct super_block *, unsigned long,
+extern struct inode *find_inode_rcu(struct super_block *, u64,
int (*)(struct inode *, void *), void *);
-extern struct inode *find_inode_by_ino_rcu(struct super_block *, unsigned long);
-extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *);
+extern struct inode *find_inode_by_ino_rcu(struct super_block *, u64);
+extern int insert_inode_locked4(struct inode *, u64, int (*test)(struct inode *, void *), void *);
extern int insert_inode_locked(struct inode *);
#ifdef CONFIG_DEBUG_LOCK_ALLOC
extern void lockdep_annotate_inode_mutex_key(struct inode *inode);
@@ -3015,7 +3015,7 @@ int setattr_should_drop_sgid(struct mnt_idmap *idmap,
*/
#define alloc_inode_sb(_sb, _cache, _gfp) kmem_cache_alloc_lru(_cache, &_sb->s_inode_lru, _gfp)
-extern void __insert_inode_hash(struct inode *, unsigned long hashval);
+extern void __insert_inode_hash(struct inode *, u64 hashval);
static inline void insert_inode_hash(struct inode *inode)
{
__insert_inode_hash(inode, inode->i_ino);
--
2.53.0
^ permalink raw reply related
* [PATCH 00/61] vfs: change inode->i_ino from unsigned long to u64
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
Christian said [1] to "just do it" when I proposed this, so here we are!
For historical reasons, the inode->i_ino field is an unsigned long,
which means that it's 32 bits on 32 bit architectures. This has caused a
number of filesystems to implement hacks to hash a 64-bit identifier
into a 32-bit field, and deprives us of a universal identifier field for
an inode.
This patchset changes the inode->i_ino field from an unsigned long to a
u64. This shouldn't make any material difference on 64-bit hosts, but
32-bit hosts will see struct inode grow by at least 4 bytes. This could
have effects on slabcache sizes and field alignment.
The bulk of the changes are to format strings and tracepoints, since the
kernel itself doesn't care that much about the i_ino field. The first
patch changes some vfs function arguments, so check that one out
carefully.
With this change, we may be able to shrink some inode structures. For
instance, struct nfs_inode has a fileid field that holds the 64-bit
inode number. With this set of changes, that field could be eliminated.
I'd rather leave that sort of cleanups for later just to keep this
simple.
Much of this set was generated by LLM, but I attributed it to myself
since I consider this to be in the "menial tasks" category of LLM usage.
[1]: https://lore.kernel.org/linux-fsdevel/20260219-portrait-winkt-959070cee42f@brauner/
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Jeff Layton (61):
vfs: widen inode hash/lookup functions to u64
vfs: change i_ino from unsigned long to u64
trace: update VFS-layer trace events for u64 i_ino
ext4: update for u64 i_ino
jbd2: update format strings for u64 i_ino
f2fs: update for u64 i_ino
lockd: update format strings for u64 i_ino
nfs: update for u64 i_ino
nfs: remove nfs_fattr_to_ino_t() and nfs_fileid_to_ino_t()
nfs: remove nfs_compat_user_ino64()
nfs: remove enable_ino64 module parameter
nfsd: update format strings for u64 i_ino
smb: store full 64-bit uniqueid in i_ino
smb: remove cifs_uniqueid_to_ino_t()
locks: update /proc/locks format for u64 i_ino
proc: update /proc/PID/maps for u64 i_ino
nilfs2: update for u64 i_ino
9p: update format strings for u64 i_ino
affs: update format strings for u64 i_ino
afs: update format strings for u64 i_ino
autofs: update format strings for u64 i_ino
befs: update format strings for u64 i_ino
bfs: update format strings for u64 i_ino
cachefiles: update format strings for u64 i_ino
ceph: update format strings for u64 i_ino
coda: update format strings for u64 i_ino
cramfs: update format strings for u64 i_ino
ecryptfs: update format strings for u64 i_ino
efs: update format strings for u64 i_ino
exportfs: update format strings for u64 i_ino
ext2: update format strings for u64 i_ino
freevxfs: update format strings for u64 i_ino
hfs: update format strings for u64 i_ino
hfsplus: update format strings for u64 i_ino
hpfs: update format strings for u64 i_ino
isofs: update format strings for u64 i_ino
jffs2: update format strings for u64 i_ino
jfs: update format strings for u64 i_ino
minix: update format strings for u64 i_ino
nsfs: update format strings for u64 i_ino
ntfs3: update format strings for u64 i_ino
ocfs2: update format strings for u64 i_ino
orangefs: update format strings for u64 i_ino
overlayfs: update format strings for u64 i_ino
qnx4: update format strings for u64 i_ino
qnx6: update format strings for u64 i_ino
ubifs: update format strings for u64 i_ino
udf: update format strings for u64 i_ino
ufs: update format strings for u64 i_ino
zonefs: update format strings for u64 i_ino
security: update audit format strings for u64 i_ino
drm/amdgpu: update for u64 i_ino
fsnotify: update fdinfo format strings for u64 i_ino
net: update socket dname format for u64 i_ino
uprobes: update format strings for u64 i_ino
dma-buf: update format string for u64 i_ino
fscrypt: update format strings for u64 i_ino
fsverity: update format string for u64 i_ino
iomap: update format string for u64 i_ino
net: update legacy protocol format strings for u64 i_ino
vfs: update core format strings for u64 i_ino
drivers/dma-buf/dma-buf.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +-
fs/9p/vfs_addr.c | 4 +-
fs/9p/vfs_inode.c | 6 +-
fs/9p/vfs_inode_dotl.c | 6 +-
fs/affs/amigaffs.c | 8 +-
fs/affs/bitmap.c | 2 +-
fs/affs/dir.c | 2 +-
fs/affs/file.c | 20 +-
fs/affs/inode.c | 12 +-
fs/affs/namei.c | 14 +-
fs/affs/symlink.c | 2 +-
fs/afs/dir.c | 10 +-
fs/afs/dir_search.c | 2 +-
fs/afs/dynroot.c | 2 +-
fs/afs/inode.c | 2 +-
fs/autofs/inode.c | 2 +-
fs/befs/linuxvfs.c | 28 +-
fs/bfs/dir.c | 4 +-
fs/cachefiles/io.c | 6 +-
fs/cachefiles/namei.c | 12 +-
fs/cachefiles/xattr.c | 2 +-
fs/ceph/crypto.c | 4 +-
fs/coda/dir.c | 2 +-
fs/coda/inode.c | 2 +-
fs/cramfs/inode.c | 2 +-
fs/crypto/crypto.c | 2 +-
fs/crypto/hooks.c | 2 +-
fs/crypto/keysetup.c | 2 +-
fs/dcache.c | 4 +-
fs/ecryptfs/crypto.c | 6 +-
fs/ecryptfs/file.c | 2 +-
fs/efs/inode.c | 6 +-
fs/eventpoll.c | 2 +-
fs/exportfs/expfs.c | 4 +-
fs/ext2/dir.c | 10 +-
fs/ext2/ialloc.c | 9 +-
fs/ext2/inode.c | 2 +-
fs/ext2/xattr.c | 14 +-
fs/ext4/dir.c | 2 +-
fs/ext4/ext4.h | 4 +-
fs/ext4/extents.c | 8 +-
fs/ext4/extents_status.c | 28 +-
fs/ext4/fast_commit.c | 8 +-
fs/ext4/ialloc.c | 10 +-
fs/ext4/indirect.c | 2 +-
fs/ext4/inline.c | 14 +-
fs/ext4/inode.c | 22 +-
fs/ext4/ioctl.c | 4 +-
fs/ext4/mballoc.c | 6 +-
fs/ext4/migrate.c | 2 +-
fs/ext4/move_extent.c | 20 +-
fs/ext4/namei.c | 10 +-
fs/ext4/orphan.c | 16 +-
fs/ext4/page-io.c | 10 +-
fs/ext4/super.c | 22 +-
fs/ext4/xattr.c | 10 +-
fs/f2fs/compress.c | 4 +-
fs/f2fs/dir.c | 2 +-
fs/f2fs/extent_cache.c | 8 +-
fs/f2fs/f2fs.h | 6 +-
fs/f2fs/file.c | 12 +-
fs/f2fs/gc.c | 2 +-
fs/f2fs/inline.c | 4 +-
fs/f2fs/inode.c | 48 ++--
fs/f2fs/namei.c | 8 +-
fs/f2fs/node.c | 12 +-
fs/f2fs/recovery.c | 10 +-
fs/f2fs/xattr.c | 10 +-
fs/freevxfs/vxfs_bmap.c | 4 +-
fs/fserror.c | 2 +-
fs/hfs/catalog.c | 2 +-
fs/hfs/extent.c | 4 +-
fs/hfs/inode.c | 4 +-
fs/hfsplus/attributes.c | 10 +-
fs/hfsplus/catalog.c | 2 +-
fs/hfsplus/dir.c | 6 +-
fs/hfsplus/extents.c | 6 +-
fs/hfsplus/inode.c | 8 +-
fs/hfsplus/super.c | 6 +-
fs/hfsplus/xattr.c | 10 +-
fs/hpfs/dir.c | 4 +-
fs/hpfs/dnode.c | 4 +-
fs/hpfs/ea.c | 4 +-
fs/hpfs/inode.c | 4 +-
fs/inode.c | 46 ++--
fs/iomap/ioend.c | 2 +-
fs/isofs/compress.c | 2 +-
fs/isofs/dir.c | 2 +-
fs/isofs/inode.c | 6 +-
fs/isofs/namei.c | 2 +-
fs/jbd2/journal.c | 4 +-
fs/jbd2/transaction.c | 2 +-
fs/jffs2/dir.c | 4 +-
fs/jffs2/file.c | 4 +-
fs/jffs2/fs.c | 18 +-
fs/jfs/inode.c | 2 +-
fs/jfs/jfs_imap.c | 2 +-
fs/jfs/jfs_metapage.c | 2 +-
fs/lockd/svclock.c | 8 +-
fs/lockd/svcsubs.c | 2 +-
fs/locks.c | 6 +-
fs/minix/inode.c | 10 +-
fs/nfs/dir.c | 22 +-
fs/nfs/file.c | 8 +-
fs/nfs/filelayout/filelayout.c | 8 +-
fs/nfs/flexfilelayout/flexfilelayout.c | 8 +-
fs/nfs/inode.c | 54 +---
fs/nfs/nfs4proc.c | 4 +-
fs/nfs/pnfs.c | 12 +-
fs/nfsd/export.c | 2 +-
fs/nfsd/nfs4state.c | 4 +-
fs/nfsd/nfsfh.c | 4 +-
fs/nfsd/vfs.c | 2 +-
fs/nilfs2/alloc.c | 10 +-
fs/nilfs2/bmap.c | 2 +-
fs/nilfs2/btnode.c | 2 +-
fs/nilfs2/btree.c | 12 +-
fs/nilfs2/dir.c | 12 +-
fs/nilfs2/direct.c | 4 +-
fs/nilfs2/gcinode.c | 2 +-
fs/nilfs2/inode.c | 8 +-
fs/nilfs2/mdt.c | 2 +-
fs/nilfs2/namei.c | 2 +-
fs/nilfs2/segment.c | 2 +-
fs/notify/fdinfo.c | 4 +-
fs/nsfs.c | 4 +-
fs/ntfs3/super.c | 2 +-
fs/ocfs2/alloc.c | 2 +-
fs/ocfs2/aops.c | 4 +-
fs/ocfs2/dir.c | 8 +-
fs/ocfs2/dlmfs/dlmfs.c | 10 +-
fs/ocfs2/extent_map.c | 12 +-
fs/ocfs2/inode.c | 2 +-
fs/ocfs2/quota_local.c | 2 +-
fs/ocfs2/refcounttree.c | 10 +-
fs/ocfs2/xattr.c | 4 +-
fs/orangefs/inode.c | 2 +-
fs/overlayfs/export.c | 2 +-
fs/overlayfs/namei.c | 4 +-
fs/overlayfs/util.c | 2 +-
fs/pipe.c | 2 +-
fs/proc/fd.c | 2 +-
fs/proc/task_mmu.c | 4 +-
fs/qnx4/inode.c | 4 +-
fs/qnx6/inode.c | 2 +-
fs/smb/client/cifsfs.h | 17 --
fs/smb/client/inode.c | 6 +-
fs/smb/client/readdir.c | 2 +-
fs/ubifs/debug.c | 8 +-
fs/ubifs/dir.c | 28 +-
fs/ubifs/file.c | 28 +-
fs/ubifs/journal.c | 6 +-
fs/ubifs/super.c | 16 +-
fs/ubifs/tnc.c | 4 +-
fs/ubifs/xattr.c | 14 +-
fs/udf/directory.c | 18 +-
fs/udf/file.c | 2 +-
fs/udf/inode.c | 12 +-
fs/udf/namei.c | 8 +-
fs/udf/super.c | 2 +-
fs/ufs/balloc.c | 6 +-
fs/ufs/dir.c | 10 +-
fs/ufs/ialloc.c | 6 +-
fs/ufs/inode.c | 18 +-
fs/ufs/ufs_fs.h | 6 +-
fs/ufs/util.c | 2 +-
fs/verity/init.c | 2 +-
fs/zonefs/super.c | 8 +-
include/linux/fs.h | 28 +-
include/linux/nfs_fs.h | 10 -
include/trace/events/cachefiles.h | 18 +-
include/trace/events/ext4.h | 427 +++++++++++++++--------------
include/trace/events/f2fs.h | 172 ++++++------
include/trace/events/filelock.h | 16 +-
include/trace/events/filemap.h | 20 +-
include/trace/events/fs_dax.h | 20 +-
include/trace/events/fsverity.h | 30 +-
include/trace/events/hugetlbfs.h | 28 +-
include/trace/events/netfs.h | 4 +-
include/trace/events/nilfs2.h | 12 +-
include/trace/events/readahead.h | 12 +-
include/trace/events/timestamp.h | 12 +-
include/trace/events/writeback.h | 148 +++++-----
kernel/events/uprobes.c | 4 +-
net/netrom/af_netrom.c | 4 +-
net/rose/af_rose.c | 4 +-
net/socket.c | 2 +-
net/x25/x25_proc.c | 4 +-
security/apparmor/apparmorfs.c | 4 +-
security/integrity/integrity_audit.c | 2 +-
security/ipe/audit.c | 2 +-
security/lsm_audit.c | 10 +-
security/selinux/hooks.c | 4 +-
security/smack/smack_lsm.c | 12 +-
195 files changed, 1101 insertions(+), 1166 deletions(-)
---
base-commit: 2bf35e96cf6c6c3a290b69b777d34be15888e364
change-id: 20260224-iino-u64-b44a3a72543c
Best regards,
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply
* Re: [PATCH 0/2] fanotify: avid some premature LSM checks
From: Jan Kara @ 2026-02-26 14:19 UTC (permalink / raw)
To: Ondrej Mosnacek
Cc: Jan Kara, Amir Goldstein, Matthew Bobrowski, linux-fsdevel,
linux-security-module, selinux, linux-kernel
In-Reply-To: <yk2qcux2ee7afr24xw6p7wp4t3islu64ttfsrheac2zwr6odnw@kmagnqbldb3f>
On Tue 17-02-26 12:09:34, Jan Kara wrote:
> On Mon 16-02-26 16:06:23, Ondrej Mosnacek wrote:
> > Restructure some of the validity and security checks in
> > fs/notify/fanotify/fanotify_user.c to avoid generating LSM access
> > denials in the audit log where hey shouldn't be.
> >
> > Ondrej Mosnacek (2):
> > fanotify: avoid/silence premature LSM capability checks
> > fanotify: call fanotify_events_supported() before path_permission()
> > and security_path_notify()
> >
> > fs/notify/fanotify/fanotify_user.c | 50 ++++++++++++++----------------
> > 1 file changed, 23 insertions(+), 27 deletions(-)
>
> The series looks good to me as well. Thanks! I'll commit the series to my
> tree once the merge window closes and fixup the comment formatting on
> commit. No need to resend.
Pushed the series to my tree now.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply
* Re: [PATCH 1/3] integrity: Make arch_ima_get_secureboot integrity-wide
From: Ard Biesheuvel @ 2026-02-26 10:23 UTC (permalink / raw)
To: Mimi Zohar
Cc: Coiby Xu, Dave Hansen, linux-integrity, Heiko Carstens,
Roberto Sassu, Catalin Marinas, Will Deacon, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
Sven Schnelle, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
H . Peter Anvin, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg,
Paul Moore, James Morris, Serge E. Hallyn, Jarkko Sakkinen,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE), open list,
open list:LINUX FOR POWERPC (32-BIT AND 64-BIT),
open list:S390 ARCHITECTURE,
open list:EXTENSIBLE FIRMWARE INTERFACE (EFI),
open list:SECURITY SUBSYSTEM, open list:KEYS/KEYRINGS_INTEGRITY
In-Reply-To: <ad471c33eeb9e21c49ac81032dc64555a2fb816f.camel@linux.ibm.com>
On Wed, 25 Feb 2026, at 01:03, Mimi Zohar wrote:
> On Wed, 2026-01-21 at 17:25 +0100, Ard Biesheuvel wrote:
>> On Wed, 21 Jan 2026 at 16:41, Mimi Zohar <zohar@linux.ibm.com> wrote:
>> >
>> > On Mon, 2026-01-19 at 12:04 +0800, Coiby Xu wrote:
>> >
>> > > diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
>> > > index 976e75f9b9ba..5dce572192d6 100644
>> > > --- a/security/integrity/ima/Kconfig
>> > > +++ b/security/integrity/ima/Kconfig
>> > > @@ -311,6 +311,7 @@ config IMA_QUEUE_EARLY_BOOT_KEYS
>> > > config IMA_SECURE_AND_OR_TRUSTED_BOOT
>> > > bool
>> > > depends on IMA_ARCH_POLICY
>> > > + depends on INTEGRITY_SECURE_BOOT
>> > >
>> > >
>> > > Another idea is make a tree-wide arch_get_secureboot i.e. to move
>> > > current arch_ima_get_secureboot code to arch-specific secure boot
>> > > implementation. By this way, there will no need for a new Kconfig option
>> > > INTEGRITY_SECURE_BOOT. But I'm not sure if there is any unforeseen
>> > > concern.
>> >
>> > Originally basing IMA policy on the secure boot mode was an exception. As long
>> > as making it public isn't an issue any longer, this sounds to me. Ard, Dave, do
>> > you have any issues with replacing arch_ima_get_secureboot() with
>> > arch_get_secureboot()?
>>
>> I don't see an issue with that. If there is a legitimate need to
>> determine this even if IMA is not enabled, then this makes sense.
>
> Ard, Dave -
>
> FYI, Coiby posted v3 of this patch set[1], which is queued in the next-
> integrity-testing branch[2].
>
> [1]
> https://lore.kernel.org/linux-integrity/20260213012851.2532722-1-coxu@redhat.com/
>
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git/
>
Ack. Looks fine to me.
^ permalink raw reply
* Re: [PATCH v5] ima_fs: Avoid creating measurement lists for unsupported hash algos
From: Roberto Sassu @ 2026-02-26 9:05 UTC (permalink / raw)
To: Mimi Zohar, dima, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg,
Paul Moore, James Morris, Serge E. Hallyn, Silvia Sisinni,
Enrico Bravi
Cc: Jonathan McDowell, linux-integrity, linux-security-module,
linux-kernel, stable, Dmitry Safonov
In-Reply-To: <6808b1a8fcb014e6c7c18241d39155f5c12edc31.camel@linux.ibm.com>
On Wed, 2026-02-25 at 15:36 -0500, Mimi Zohar wrote:
> On Mon, 2026-02-23 at 14:56 +0000, Dmitry Safonov via B4 Relay wrote:
> > From: Dmitry Safonov <dima@arista.com>
> >
> > ima_tpm_chip->allocated_banks[i].crypto_id is initialized to
> > HASH_ALGO__LAST if the TPM algorithm is not supported. However there
> > are places relying on the algorithm to be valid because it is accessed
> > by hash_algo_name[].
>
> If the TPM algorithm is not supported by whom? the kernel? HASH_ALGO__LAST is
> defined in linux/hash_info.h. If the crypto algorithm is not supported by the
> kernel, then the kernel won't be able to calculate the hash to extend the TPM.
Yes, by the kernel. True, that is why we do a padded SHA1.
> > @@ -404,16 +398,24 @@ static int __init create_securityfs_measurement_lists(void)
> > char file_name[NAME_MAX + 1];
> > struct dentry *dentry;
> >
> > - sprintf(file_name, "ascii_runtime_measurements_%s",
> > - hash_algo_name[algo]);
> > + if (algo == HASH_ALGO__LAST)
> > + sprintf(file_name, "ascii_runtime_measurements_tpm_alg_%x",
> > + ima_tpm_chip->allocated_banks[i].alg_id);
> > + else
> > + sprintf(file_name, "ascii_runtime_measurements_%s",
> > + hash_algo_name[algo]);
> > dentry = securityfs_create_file(file_name, S_IRUSR | S_IRGRP,
> > ima_dir, (void *)(uintptr_t)i,
> > &ima_ascii_measurements_ops);
> > if (IS_ERR(dentry))
> > return PTR_ERR(dentry);
> >
> > - sprintf(file_name, "binary_runtime_measurements_%s",
> > - hash_algo_name[algo]);
> > + if (algo == HASH_ALGO__LAST)
> > + sprintf(file_name, "binary_runtime_measurements_tpm_alg_%x",
> > + ima_tpm_chip->allocated_banks[i].alg_id);
>
> There's no point in creating either of the securityfs files if the kernel
> doesn't support the hash algorithm.
It is not useful per se, but since it is an information that it is
produced and maintained by IMA, we can print it. And second, it will
expose the fact that there is an unsupported algorithm (in the case of
SHA3-256, the fix is add to the TPM - crypto subsystem mapping in tpm2-
cmd.c).
Roberto
> Mimi
>
>
> > + else
> > + sprintf(file_name, "binary_runtime_measurements_%s",
> > + hash_algo_name[algo]);
> > dentry = securityfs_create_file(file_name, S_IRUSR | S_IRGRP,
> > ima_dir, (void *)(uintptr_t)i,
> > &ima_measurements_ops);
>
>
^ permalink raw reply
* Re: [PATCH] ima: Add digest_size field to ima_algo_desc structure and use to show meas.
From: Roberto Sassu @ 2026-02-26 9:00 UTC (permalink / raw)
To: Mimi Zohar, dmitry.kasatkin, eric.snowberg, paul, jmorris, serge
Cc: linux-integrity, linux-security-module, linux-kernel,
devnull+dima.arista.com, Roberto Sassu
In-Reply-To: <55905382b88f00de0d7a82aff0605b6d0d9a1e8c.camel@linux.ibm.com>
On Wed, 2026-02-25 at 13:37 -0500, Mimi Zohar wrote:
> On Wed, 2026-02-25 at 13:53 +0100, Roberto Sassu wrote:
> > From: Roberto Sassu <roberto.sassu@huawei.com>
> >
> > Add the digest_size field to the ima_algo_desc structure to determine the
> > digest size from the correct source.
> >
> > If the hash algorithm is among allocated PCR banks, take the value from the
> > TPM bank info; if the hash algorithm is SHA1, use the predefined value; if
> > the hash algorithm is the default one but not among the PCR banks, take the
> > digest size from the crypto subsystem (the default hash algorithm is
> > checked when parsing the ima_hash= command line option).
> >
> > Finally, use the new information to correctly show the template digest in
> > ima_measurements_show() and ima_ascii_measurements_show().
> >
> > Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
>
> Thanks, Roberto. The patch looks fine, other than the patch title. Could it be
> renamed as "ima: define and use a digest_size field in the ima_algo_desc
> structure"?
Sure, will do this and add a comment about the TPM digest size.
Thanks
Roberto
^ permalink raw reply
* Re: [PATCH v3 2/2] landlock: Clean up interrupted thread logic in TSYNC
From: Günther Noack @ 2026-02-26 7:23 UTC (permalink / raw)
To: Yihan Ding
Cc: Mickaël Salaün, Paul Moore, Jann Horn,
linux-security-module, linux-kernel, syzbot+7ea2f5e9dfd468201817
In-Reply-To: <20260226015903.3158620-3-dingyihan@uniontech.com>
On Thu, Feb 26, 2026 at 09:59:03AM +0800, Yihan Ding wrote:
> In landlock_restrict_sibling_threads(), when the calling thread is
> interrupted while waiting for sibling threads to prepare, it executes
> a recovery path.
>
> Previously, this path included a wait_for_completion() call on
> all_prepared to prevent a Use-After-Free of the local shared_ctx.
> However, this wait is redundant. Exiting the main do-while loop
> already leads to a bottom cleanup section that unconditionally waits
> for all_finished. Therefore, replacing the wait with a simple break
> is safe, prevents UAF, and correctly unblocks the remaining task_works.
>
> Clean up the error path by breaking the loop and updating the
> surrounding comments to accurately reflect the state machine.
>
> Suggested-by: Günther Noack <gnoack3000@gmail.com>
> Signed-off-by: Yihan Ding <dingyihan@uniontech.com>
> ---
> Change in v3:
> -No change in v3
>
> Changes in v2:
> - Replaced wait_for_completion(&shared_ctx.all_prepared) with a break
> statement based on the realization that the bottom wait for 'all_finished'
> already guards against UAF.
> - Updated comments for clarity.
> ---
> security/landlock/tsync.c | 18 +++++++++++-------
> 1 file changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/security/landlock/tsync.c b/security/landlock/tsync.c
> index 420fcfc2fe9a..9731ec7f329a 100644
> --- a/security/landlock/tsync.c
> +++ b/security/landlock/tsync.c
> @@ -534,24 +534,28 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred,
> -ERESTARTNOINTR);
>
> /*
> - * Cancel task works for tasks that did not start running yet,
> - * and decrement all_prepared and num_unfinished accordingly.
> + * Opportunistic improvement: try to cancel task works
> + * for tasks that did not start running yet. We do not
> + * have a guarantee that it cancels any of the enqueued
> + * task works (because task_work_run() might already have
> + * dequeued them).
> */
> cancel_tsync_works(&works, &shared_ctx);
>
> /*
> - * The remaining task works have started running, so waiting for
> - * their completion will finish.
> + * Break the loop with error. The cleanup code after the loop
> + * unblocks the remaining task_works.
> */
> - wait_for_completion(&shared_ctx.all_prepared);
> + break;
> }
> }
> } while (found_more_threads &&
> !atomic_read(&shared_ctx.preparation_error));
>
> /*
> - * We now have all sibling threads blocking and in "prepared" state in the
> - * task work. Ask all threads to commit.
> + * We now have either (a) all sibling threads blocking and in
> + * "prepared" state in the task work, or (b) the preparation error is
> + * set. Ask all threads to commit (or abort).
> */
> complete_all(&shared_ctx.ready_to_commit);
>
> --
> 2.51.0
>
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
^ permalink raw reply
* Re: [PATCH v3 1/2] landlock: Serialize TSYNC thread restriction
From: Günther Noack @ 2026-02-26 7:23 UTC (permalink / raw)
To: Yihan Ding
Cc: Mickaël Salaün, Paul Moore, Jann Horn,
linux-security-module, linux-kernel, syzbot+7ea2f5e9dfd468201817
In-Reply-To: <20260226015903.3158620-2-dingyihan@uniontech.com>
On Thu, Feb 26, 2026 at 09:59:02AM +0800, Yihan Ding wrote:
> syzbot found a deadlock in landlock_restrict_sibling_threads().
> When multiple threads concurrently call landlock_restrict_self() with
> sibling thread restriction enabled, they can deadlock by mutually
> queueing task_works on each other and then blocking in kernel space
> (waiting for the other to finish).
>
> Fix this by serializing the TSYNC operations within the same process
> using the exec_update_lock. This prevents concurrent invocations
> from deadlocking.
>
> We use down_write_trylock() and return -ERESTARTNOINTR if the lock
> cannot be acquired immediately. This ensures that if a thread fails
> to get the lock, it will return to userspace, allowing it to process
> any pending TSYNC task_works from the lock holder, and then
> transparently restart the syscall.
>
> Fixes: 42fc7e6543f6 ("landlock: Multithreading support for landlock_restrict_self()")
> Reported-by: syzbot+7ea2f5e9dfd468201817@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=7ea2f5e9dfd468201817
> Suggested-by: Günther Noack <gnoack3000@gmail.com>
> Signed-off-by: Yihan Ding <dingyihan@uniontech.com>
> ---
> Changes in v3:
> - Replaced down_write_killable() with down_write_trylock() and
> returned -ERESTARTNOINTR to avoid a secondary deadlock caused by
> blocking the execution of task_works. (Caught by Günther Noack).
>
> Changes in v2:
> - Use down_write_killable() instead of down_write().
> - Split the interrupt path cleanup into a separate patch.
> ---
> security/landlock/tsync.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/security/landlock/tsync.c b/security/landlock/tsync.c
> index de01aa899751..xxxxxxxxxxxx 100644
> --- a/security/landlock/tsync.c
> +++ b/security/landlock/tsync.c
> @@ -447,6 +447,13 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred,
> shared_ctx.new_cred = new_cred;
> shared_ctx.set_no_new_privs = task_no_new_privs(current);
>
> + /*
> + * Serialize concurrent TSYNC operations to prevent deadlocks
> + * when multiple threads call landlock_restrict_self() simultaneously.
> + */
> + if (!down_write_trylock(¤t->signal->exec_update_lock))
> + return -ERESTARTNOINTR;
> +
> /*
> * We schedule a pseudo-signal task_work for each of the calling task's
> * sibling threads. In the task work, each thread:
> @@ -556,6 +563,7 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred,
> wait_for_completion(&shared_ctx.all_finished);
>
> tsync_works_release(&works);
> + up_write(¤t->signal->exec_update_lock);
>
> return atomic_read(&shared_ctx.preparation_error);
> }
> --
> 2.51.0
>
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
^ permalink raw reply
* [PATCH 1/2] ima: efi: Drop unnecessary check for CONFIG_MODULE_SIG/CONFIG_KEXEC_SIG
From: Thomas Weißschuh @ 2026-02-26 7:20 UTC (permalink / raw)
To: Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg,
Paul Moore, James Morris, Serge E. Hallyn, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP)
Cc: linux-integrity, linux-security-module, linux-kernel,
linuxppc-dev, Thomas Weißschuh, Aaron Tomlin, Nicolas Schier
In-Reply-To: <20260226-ima-ifdef-v1-0-8b9613edbbdb@weissschuh.net>
When configuration settings are disabled the guarded functions are
defined as empty stubs, so the check is unnecessary.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
---
security/integrity/ima/ima_efi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/security/integrity/ima/ima_efi.c b/security/integrity/ima/ima_efi.c
index 138029bfcce1..a35dd166ad47 100644
--- a/security/integrity/ima/ima_efi.c
+++ b/security/integrity/ima/ima_efi.c
@@ -68,10 +68,8 @@ static const char * const sb_arch_rules[] = {
const char * const *arch_get_ima_policy(void)
{
if (IS_ENABLED(CONFIG_IMA_ARCH_POLICY) && arch_ima_get_secureboot()) {
- if (IS_ENABLED(CONFIG_MODULE_SIG))
- set_module_sig_enforced();
- if (IS_ENABLED(CONFIG_KEXEC_SIG))
- set_kexec_sig_enforced();
+ set_module_sig_enforced();
+ set_kexec_sig_enforced();
return sb_arch_rules;
}
return NULL;
--
2.53.0
^ permalink raw reply related
* [PATCH 2/2] powerpc/ima: Drop unnecessary check for CONFIG_MODULE_SIG
From: Thomas Weißschuh @ 2026-02-26 7:20 UTC (permalink / raw)
To: Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg,
Paul Moore, James Morris, Serge E. Hallyn, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP)
Cc: linux-integrity, linux-security-module, linux-kernel,
linuxppc-dev, Thomas Weißschuh, Aaron Tomlin, Nicolas Schier
In-Reply-To: <20260226-ima-ifdef-v1-0-8b9613edbbdb@weissschuh.net>
When CONFIG_MODULE_SIG is disabled set_module_sig_enforced() is defined
as an empty stub, so the check is unnecessary.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
---
arch/powerpc/kernel/ima_arch.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/ima_arch.c b/arch/powerpc/kernel/ima_arch.c
index b7029beed847..690263bf4265 100644
--- a/arch/powerpc/kernel/ima_arch.c
+++ b/arch/powerpc/kernel/ima_arch.c
@@ -63,8 +63,7 @@ static const char *const secure_and_trusted_rules[] = {
const char *const *arch_get_ima_policy(void)
{
if (is_ppc_secureboot_enabled()) {
- if (IS_ENABLED(CONFIG_MODULE_SIG))
- set_module_sig_enforced();
+ set_module_sig_enforced();
if (is_ppc_trustedboot_enabled())
return secure_and_trusted_rules;
--
2.53.0
^ permalink raw reply related
* [PATCH 0/2] efi: Drop unnecessary check for CONFIG_MODULE_SIG/CONFIG_KEXEC_SIG
From: Thomas Weißschuh @ 2026-02-26 7:20 UTC (permalink / raw)
To: Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg,
Paul Moore, James Morris, Serge E. Hallyn, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP)
Cc: linux-integrity, linux-security-module, linux-kernel,
linuxppc-dev, Thomas Weißschuh, Aaron Tomlin, Nicolas Schier
When configuration settings are disabled the guarded functions are
defined as empty stubs, so the check is unnecessary.
This was originally part of my CONFIG_MODULE_HASHES[0] series,
but as I am dropping IMA compatibility for now, these patches
can go in independently.
[0] https://lore.kernel.org/lkml/20260113-module-hashes-v4-0-0b932db9b56b@weissschuh.net/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (2):
ima: efi: Drop unnecessary check for CONFIG_MODULE_SIG/CONFIG_KEXEC_SIG
powerpc/ima: Drop unnecessary check for CONFIG_MODULE_SIG
arch/powerpc/kernel/ima_arch.c | 3 +--
security/integrity/ima/ima_efi.c | 6 ++----
2 files changed, 3 insertions(+), 6 deletions(-)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260225-ima-ifdef-978960c0f00e
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply
* [PATCH v3 1/2] landlock: Serialize TSYNC thread restriction
From: Yihan Ding @ 2026-02-26 1:59 UTC (permalink / raw)
To: Mickaël Salaün, Günther Noack
Cc: Paul Moore, Jann Horn, linux-security-module, linux-kernel,
syzbot+7ea2f5e9dfd468201817, Yihan Ding
In-Reply-To: <20260226015903.3158620-1-dingyihan@uniontech.com>
syzbot found a deadlock in landlock_restrict_sibling_threads().
When multiple threads concurrently call landlock_restrict_self() with
sibling thread restriction enabled, they can deadlock by mutually
queueing task_works on each other and then blocking in kernel space
(waiting for the other to finish).
Fix this by serializing the TSYNC operations within the same process
using the exec_update_lock. This prevents concurrent invocations
from deadlocking.
We use down_write_trylock() and return -ERESTARTNOINTR if the lock
cannot be acquired immediately. This ensures that if a thread fails
to get the lock, it will return to userspace, allowing it to process
any pending TSYNC task_works from the lock holder, and then
transparently restart the syscall.
Fixes: 42fc7e6543f6 ("landlock: Multithreading support for landlock_restrict_self()")
Reported-by: syzbot+7ea2f5e9dfd468201817@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=7ea2f5e9dfd468201817
Suggested-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Yihan Ding <dingyihan@uniontech.com>
---
Changes in v3:
- Replaced down_write_killable() with down_write_trylock() and
returned -ERESTARTNOINTR to avoid a secondary deadlock caused by
blocking the execution of task_works. (Caught by Günther Noack).
Changes in v2:
- Use down_write_killable() instead of down_write().
- Split the interrupt path cleanup into a separate patch.
---
security/landlock/tsync.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/security/landlock/tsync.c b/security/landlock/tsync.c
index de01aa899751..xxxxxxxxxxxx 100644
--- a/security/landlock/tsync.c
+++ b/security/landlock/tsync.c
@@ -447,6 +447,13 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred,
shared_ctx.new_cred = new_cred;
shared_ctx.set_no_new_privs = task_no_new_privs(current);
+ /*
+ * Serialize concurrent TSYNC operations to prevent deadlocks
+ * when multiple threads call landlock_restrict_self() simultaneously.
+ */
+ if (!down_write_trylock(¤t->signal->exec_update_lock))
+ return -ERESTARTNOINTR;
+
/*
* We schedule a pseudo-signal task_work for each of the calling task's
* sibling threads. In the task work, each thread:
@@ -556,6 +563,7 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred,
wait_for_completion(&shared_ctx.all_finished);
tsync_works_release(&works);
+ up_write(¤t->signal->exec_update_lock);
return atomic_read(&shared_ctx.preparation_error);
}
--
2.51.0
^ permalink raw reply
* [PATCH v3 2/2] landlock: Clean up interrupted thread logic in TSYNC
From: Yihan Ding @ 2026-02-26 1:59 UTC (permalink / raw)
To: Mickaël Salaün, Günther Noack
Cc: Paul Moore, Jann Horn, linux-security-module, linux-kernel,
syzbot+7ea2f5e9dfd468201817, Yihan Ding
In-Reply-To: <20260226015903.3158620-1-dingyihan@uniontech.com>
In landlock_restrict_sibling_threads(), when the calling thread is
interrupted while waiting for sibling threads to prepare, it executes
a recovery path.
Previously, this path included a wait_for_completion() call on
all_prepared to prevent a Use-After-Free of the local shared_ctx.
However, this wait is redundant. Exiting the main do-while loop
already leads to a bottom cleanup section that unconditionally waits
for all_finished. Therefore, replacing the wait with a simple break
is safe, prevents UAF, and correctly unblocks the remaining task_works.
Clean up the error path by breaking the loop and updating the
surrounding comments to accurately reflect the state machine.
Suggested-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Yihan Ding <dingyihan@uniontech.com>
---
Change in v3:
-No change in v3
Changes in v2:
- Replaced wait_for_completion(&shared_ctx.all_prepared) with a break
statement based on the realization that the bottom wait for 'all_finished'
already guards against UAF.
- Updated comments for clarity.
---
security/landlock/tsync.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/security/landlock/tsync.c b/security/landlock/tsync.c
index 420fcfc2fe9a..9731ec7f329a 100644
--- a/security/landlock/tsync.c
+++ b/security/landlock/tsync.c
@@ -534,24 +534,28 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred,
-ERESTARTNOINTR);
/*
- * Cancel task works for tasks that did not start running yet,
- * and decrement all_prepared and num_unfinished accordingly.
+ * Opportunistic improvement: try to cancel task works
+ * for tasks that did not start running yet. We do not
+ * have a guarantee that it cancels any of the enqueued
+ * task works (because task_work_run() might already have
+ * dequeued them).
*/
cancel_tsync_works(&works, &shared_ctx);
/*
- * The remaining task works have started running, so waiting for
- * their completion will finish.
+ * Break the loop with error. The cleanup code after the loop
+ * unblocks the remaining task_works.
*/
- wait_for_completion(&shared_ctx.all_prepared);
+ break;
}
}
} while (found_more_threads &&
!atomic_read(&shared_ctx.preparation_error));
/*
- * We now have all sibling threads blocking and in "prepared" state in the
- * task work. Ask all threads to commit.
+ * We now have either (a) all sibling threads blocking and in
+ * "prepared" state in the task work, or (b) the preparation error is
+ * set. Ask all threads to commit (or abort).
*/
complete_all(&shared_ctx.ready_to_commit);
--
2.51.0
^ permalink raw reply related
* [PATCH v3 0/2] landlock: Fix TSYNC deadlock and clean up error path
From: Yihan Ding @ 2026-02-26 1:59 UTC (permalink / raw)
To: Mickaël Salaün, Günther Noack
Cc: Paul Moore, Jann Horn, linux-security-module, linux-kernel,
syzbot+7ea2f5e9dfd468201817
Hello,
This patch series fixes a deadlock in the Landlock TSYNC multithreading
support, originally reported by syzbot, and cleans up the associated
interrupt recovery path.
The deadlock occurs when multiple threads concurrently call
landlock_restrict_self() with sibling thread restriction enabled,
causing them to mutually queue task_works on each other and block
indefinitely.
* Patch 1 fixes the root cause by serializing the TSYNC operations
within the same process using the exec_update_lock.
* Patch 2 cleans up the interrupt recovery path by replacing an
unnecessary wait_for_completion() with a straightforward loop break,
avoiding Use-After-Free while unblocking remaining task_works.
Changes in v3:
- Patch 1: Changed down_write_killable() to down_write_trylock() and
return -ERESTARTNOINTR on failure. This avoids a secondary deadlock
where a blocking wait prevents a sibling thread from waking up to
execute the requested TSYNC task_work. (Noted by Günther Noack.
down_write_interruptible() was also suggested but is not implemented
for rw_semaphores in the kernel).
- Patch 2: No changes.
Changes in v2:
- Split the changes into a 2-patch series.
- Patch 1: Adopted down_write_killable() instead of down_write().
- Patch 2: Removed wait_for_completion(&shared_ctx.all_prepared) and
replaced it with a `break` to prevent UAF.
Link to v2: https://lore.kernel.org/all/20260225024734.3024732-1-dingyihan@uniontech.com/
Link to v1: https://lore.kernel.org/all/20260224062729.2908692-1-dingyihan@uniontech.com/
Yihan Ding (2):
landlock: Serialize TSYNC thread restriction
landlock: Clean up interrupted thread logic in TSYNC
security/landlock/tsync.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
--
2.51.0
^ permalink raw reply
* [PATCH v3 0/2] landlock: Fix TSYNC deadlock and clean up error path
From: Yihan Ding @ 2026-02-26 1:52 UTC (permalink / raw)
To: Mickaël Salaün, Günther Noack
Cc: Paul Moore, Jann Horn, linux-security-module, linux-kernel,
syzbot+7ea2f5e9dfd468201817
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1790 bytes --]
Hello,
This patch series fixes a deadlock in the Landlock TSYNC multithreading
support, originally reported by syzbot, and cleans up the associated
interrupt recovery path.
The deadlock occurs when multiple threads concurrently call
landlock_restrict_self() with sibling thread restriction enabled,
causing them to mutually queue task_works on each other and block
indefinitely.
* Patch 1 fixes the root cause by serializing the TSYNC operations
within the same process using the exec_update_lock.
* Patch 2 cleans up the interrupt recovery path by replacing an
unnecessary wait_for_completion() with a straightforward loop break,
avoiding Use-After-Free while unblocking remaining task_works.
Changes in v3:
- Patch 1: Changed down_write_killable() to down_write_trylock() and
return -ERESTARTNOINTR on failure. This avoids a secondary deadlock
where a blocking wait prevents a sibling thread from waking up to
execute the requested TSYNC task_work. (Noted by Günther Noack.
down_write_interruptible() was also suggested but is not implemented
for rw_semaphores in the kernel).
- Patch 2: No changes.
Changes in v2:
- Split the changes into a 2-patch series.
- Patch 1: Adopted down_write_killable() instead of down_write().
- Patch 2: Removed wait_for_completion(&shared_ctx.all_prepared) and
replaced it with a `break` to prevent UAF.
Link to v2: https://lore.kernel.org/all/20260225024734.3024732-1-dingyihan@uniontech.com/
Link to v1: https://lore.kernel.org/all/20260224062729.2908692-1-dingyihan@uniontech.com/
Yihan Ding (2):
landlock: Serialize TSYNC thread restriction
landlock: Clean up interrupted thread logic in TSYNC
security/landlock/tsync.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
--
2.51.0
^ permalink raw reply
* [PATCH v3 0/2] landlock: Fix TSYNC deadlock and clean up error path
From: Yihan Ding @ 2026-02-26 1:51 UTC (permalink / raw)
To: Mickaël Salaün, Günther Noack
Cc: Paul Moore, Jann Horn, linux-security-module, linux-kernel,
syzbot+7ea2f5e9dfd468201817
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1790 bytes --]
Hello,
This patch series fixes a deadlock in the Landlock TSYNC multithreading
support, originally reported by syzbot, and cleans up the associated
interrupt recovery path.
The deadlock occurs when multiple threads concurrently call
landlock_restrict_self() with sibling thread restriction enabled,
causing them to mutually queue task_works on each other and block
indefinitely.
* Patch 1 fixes the root cause by serializing the TSYNC operations
within the same process using the exec_update_lock.
* Patch 2 cleans up the interrupt recovery path by replacing an
unnecessary wait_for_completion() with a straightforward loop break,
avoiding Use-After-Free while unblocking remaining task_works.
Changes in v3:
- Patch 1: Changed down_write_killable() to down_write_trylock() and
return -ERESTARTNOINTR on failure. This avoids a secondary deadlock
where a blocking wait prevents a sibling thread from waking up to
execute the requested TSYNC task_work. (Noted by Günther Noack.
down_write_interruptible() was also suggested but is not implemented
for rw_semaphores in the kernel).
- Patch 2: No changes.
Changes in v2:
- Split the changes into a 2-patch series.
- Patch 1: Adopted down_write_killable() instead of down_write().
- Patch 2: Removed wait_for_completion(&shared_ctx.all_prepared) and
replaced it with a `break` to prevent UAF.
Link to v2: https://lore.kernel.org/all/20260225024734.3024732-1-dingyihan@uniontech.com/
Link to v1: https://lore.kernel.org/all/20260224062729.2908692-1-dingyihan@uniontech.com/
Yihan Ding (2):
landlock: Serialize TSYNC thread restriction
landlock: Clean up interrupted thread logic in TSYNC
security/landlock/tsync.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
--
2.51.0
^ permalink raw reply
* Re: [PATCH v2 1/2] landlock: Serialize TSYNC thread restriction
From: Ding Yihan @ 2026-02-26 1:43 UTC (permalink / raw)
To: Günther Noack, Günther Noack
Cc: Mickaël Salaün, Paul Moore, Jann Horn,
linux-security-module, linux-kernel, syzbot+7ea2f5e9dfd468201817
In-Reply-To: <20260225.42330125301c@gnoack.org>
Hi Günther, great catch with the QEMU test! Returning -ERESTARTNOINTR via down_write_trylock()
is indeed the perfect way to allow the blocked thread to process the TWA_SIGNAL and retry.
I have sent v3 with this update.
在 2026/2/26 06:33, Günther Noack 写道:
> On Wed, Feb 25, 2026 at 01:07:26PM +0100, Günther Noack wrote:
>> On Wed, Feb 25, 2026 at 10:47:33AM +0800, Yihan Ding wrote:
>>> syzbot found a deadlock in landlock_restrict_sibling_threads().
>>> When multiple threads concurrently call landlock_restrict_self() with
>>> sibling thread restriction enabled, they can deadlock by mutually
>>> queueing task_works on each other and then blocking in kernel space
>>> (waiting for the other to finish).
>>>
>>> Fix this by serializing the TSYNC operations within the same process
>>> using the exec_update_lock. This prevents concurrent invocations
>>> from deadlocking. We use down_write_killable() to ensure the thread
>>> remains responsive to fatal signals while waiting for the lock.
>>>
>>> Fixes: 42fc7e6543f6 ("landlock: Multithreading support for landlock_restrict_self()")
>>> Reported-by: syzbot+7ea2f5e9dfd468201817@syzkaller.appspotmail.com
>>> Closes: https://syzkaller.appspot.com/bug?extid=7ea2f5e9dfd468201817
>>> Suggested-by: Günther Noack <gnoack3000@gmail.com>
>>> Signed-off-by: Yihan Ding <dingyihan@uniontech.com>
>>> ---
>>> security/landlock/tsync.c | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> diff --git a/security/landlock/tsync.c b/security/landlock/tsync.c
>>> index de01aa899751..420fcfc2fe9a 100644
>>> --- a/security/landlock/tsync.c
>>> +++ b/security/landlock/tsync.c
>>> @@ -447,6 +447,13 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred,
>>> shared_ctx.new_cred = new_cred;
>>> shared_ctx.set_no_new_privs = task_no_new_privs(current);
>>>
>>> + /*
>>> + * Serialize concurrent TSYNC operations to prevent deadlocks
>>> + * when multiple threads call landlock_restrict_self() simultaneously.
>>> + */
>>> + if (down_write_killable(¤t->signal->exec_update_lock))
>>> + return -EINTR;
>>> +
>>> /*
>>> * We schedule a pseudo-signal task_work for each of the calling task's
>>> * sibling threads. In the task work, each thread:
>>> @@ -556,6 +563,7 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred,
>>> wait_for_completion(&shared_ctx.all_finished);
>>>
>>> tsync_works_release(&works);
>>> + up_write(¤t->signal->exec_update_lock);
>>>
>>> return atomic_read(&shared_ctx.preparation_error);
>>> }
>>> --
>>> 2.51.0
>>>
>>
>> Thank you!
>>
>> Reviewed-by: Günther Noack <gnoack@google.com>
>
> Hello Yihan Ding!
>
> Apologies, I have to take this back -- applying the patch in this form
> would be a mistake. When I tried this out with the Syzkaller test
> case, I noticed that the tests started taking multiple seconds per
> run. The way I reproduced it was by running the Syzkaller reproducer
> under Qemu and looking for the frequency of the "executing program"
> lines that it prints for each test run.
>
> When I looked deeper, what was happening was actually that we got
> ourselves into a deadlock again, which, in hindsight should have been
> obvious: When two threads call landlock_restrict_self() roughly at the
> same time, then the one that grabs the lock first will (a) keep the
> other (killably) blocked on the lock acquisition, and (b) later ask
> the other thread to run a task work. But in order to run a task work,
> the blocked thread must first return from the syscall. However,
> down_write_killable() only returns when either the lock is available
> or when the thread was killed.
>
> To resolve this, we need to actually use a lock acquisition that
> respects other ways of interruption as well; we can either use a
> down_write_trylock() and return -ERESTARTNOINTR, or we can use
> down_write_interruptible().
>
> Sorry for the poor advice to use the _killable variant earlier. Could
> I ask you to please send another revision using _trylock() or
> _interruptible()?
>
> Thanks,
> –Günther
>
^ permalink raw reply
* Re: LSM namespacing API
From: Paul Moore @ 2026-02-26 0:05 UTC (permalink / raw)
To: linux-security-module, selinux; +Cc: John Johansen, Stephen Smalley
In-Reply-To: <CAHC9VhRGMmhxbajwQNfGFy+ZFF1uN=UEBjqQZQ4UBy7yds3eVQ@mail.gmail.com>
On Tue, Aug 19, 2025 at 10:56 AM Paul Moore <paul@paul-moore.com> wrote:
>
> Hello all,
>
> As most of you are likely aware, Stephen Smalley has been working on
> adding namespace support to SELinux, and the work has now progressed
> to the point where a serious discussion on the API is warranted ...
I spent a few hours this afternoon re-reading this thread and tweaking
the original proposal to address everything discussed. The revised
proposal is below, with a bit more detail than before, please take a
look and let us all know what you think ...
* lsm_set_self_attr(LSM_ATTR_CLONE_NEWLSM) and clone(CLONE_NEWLSM)
We would define a new LSM_ATTR flag, LSM_ATTR_CLONE_NEWLSM, which
could be used with lsm_set_self_attr() to request that an individual
LSM create a new LSM specific namespace on the next
clone(CLONE_NEWLSM) call. LSMs may choose to perform various sanity
and authorization checks at lsm_set_self_attr() time, but they must
refrain from creating a new LSM namespace until clone() is called.
LSMs may also want to ensure that any state associated with an
lsm_set_self_attr(LSM_ATTR_CLONE_NEWLSM) request is not carried across
an exec() boundary, however, that decision is left to the individual
LSMs.
We would define a new clone() flag, CLONE_NEWLSM, which would trigger
a call into the LSM framework to invoke LSM specific callbacks to
perform namespace actions specified either by the LSM's policy or an
explicit lsm_set_self_attr(LSM_ATTR_CLONE_NEWLSM) request.
As with the existing LSM_ATTR support, this is strictly an opt-in
mechanism and individual LSMs are left to handle this request as they
see fit.
The lsm_get_self_attr() syscall could be used to get the
LSM_ATTR_CLONE_NEWLSM value(s) for the current process just like any
other LSM_ATTR flag.
* lsm_set_self_attr(LSM_ATTR_UNSHARE_NEWLSM) and unshare(CLONE_NEWLSM)
This would behave similarly to LSM_ATTR_CLONE_NEWLSM, but the LSM
namespace changes would take place during an unshare() call as opposed
to a clone() call. This is kept separate from the
LSM_ATTR_CLONE_NEWLSM flag because the behaviors are quite different:
one creates a process with a new LSM namespace set, while the other
changes the LSM namespace set of a running process.
LSMs are free to implement support for either LSM_ATTR flag, both, or
none at all.
* /proc/pid/ns/lsm and setns(CLONE_NEWLSM)
The /proc/pid/ns/lsm file serves as a link/handle to the specific LSM
namespace set in use for the given process. A process wishing to move
into the same LSM namespace set as another process can use this
link/handle (or a pidfd) and setns(CLONE_NEWLSM) to change its own LSM
namespace set. It is important to note that using setns() it should
not be possible to change the individual LSMs that are part of the LSM
namespace set, the calling process' LSM namespace is set to the exact
same LSM namespace set as the specified process.
Affected LSMs may choose to enforce access controls on the
setns(CLONE_NEWLSM) operation according to their own policy.
* Policy considerations
The mechanisms above provide for three different scenarios: a new
process creating a new LSM namespace set (the clone case), an existing
process creating a new LSM namespace set (the unshare case), and an
existing process joining an existing LSM namespace set (the setns
case).
In the clone case a new LSM namespace set will be created when the
process itself is created. It is up to the individual LSMs to
properly initialize their own namespaces and load any required
policies. Since the new LSM namespaces are created at clone() time
and before exec(), the calling process, or another trusted process
using a new yet-to-be-finalized API, should be able to configure the
newly created LSM namespace before exec().
The unshare case is similar to clone because a new LSM namespace set
is created, but it is a bit more challenging because unshare()
modifies the calling process's LSM namespace set, not a newly created
child process'. For simpler LSMs this might not pose a problem, but
for more complex LSMs, developing meaningful applications that use
unshare(CLONE_NEWLSM) and properly initialize/setup the new LSM
namespace set may prove challenging. Developing applications that use
clone(CLONE_NEWLSM) will likely be much easier.
In the setns case the process joins a properly configured LSM
namespace set with all necessary LSM policies loaded, there shouldn't
be any additional LSM setup required (although the work to change the
individual LSM namespaces on a running process may prove difficult).
--
paul-moore.com
^ permalink raw reply
* Re: [PATCH v2 1/2] landlock: Serialize TSYNC thread restriction
From: Günther Noack @ 2026-02-25 22:33 UTC (permalink / raw)
To: Günther Noack
Cc: Yihan Ding, Mickaël Salaün, Paul Moore, Jann Horn,
linux-security-module, linux-kernel, syzbot+7ea2f5e9dfd468201817
In-Reply-To: <aZ7l6jU7XJ1BYbN-@google.com>
On Wed, Feb 25, 2026 at 01:07:26PM +0100, Günther Noack wrote:
> On Wed, Feb 25, 2026 at 10:47:33AM +0800, Yihan Ding wrote:
> > syzbot found a deadlock in landlock_restrict_sibling_threads().
> > When multiple threads concurrently call landlock_restrict_self() with
> > sibling thread restriction enabled, they can deadlock by mutually
> > queueing task_works on each other and then blocking in kernel space
> > (waiting for the other to finish).
> >
> > Fix this by serializing the TSYNC operations within the same process
> > using the exec_update_lock. This prevents concurrent invocations
> > from deadlocking. We use down_write_killable() to ensure the thread
> > remains responsive to fatal signals while waiting for the lock.
> >
> > Fixes: 42fc7e6543f6 ("landlock: Multithreading support for landlock_restrict_self()")
> > Reported-by: syzbot+7ea2f5e9dfd468201817@syzkaller.appspotmail.com
> > Closes: https://syzkaller.appspot.com/bug?extid=7ea2f5e9dfd468201817
> > Suggested-by: Günther Noack <gnoack3000@gmail.com>
> > Signed-off-by: Yihan Ding <dingyihan@uniontech.com>
> > ---
> > security/landlock/tsync.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/security/landlock/tsync.c b/security/landlock/tsync.c
> > index de01aa899751..420fcfc2fe9a 100644
> > --- a/security/landlock/tsync.c
> > +++ b/security/landlock/tsync.c
> > @@ -447,6 +447,13 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred,
> > shared_ctx.new_cred = new_cred;
> > shared_ctx.set_no_new_privs = task_no_new_privs(current);
> >
> > + /*
> > + * Serialize concurrent TSYNC operations to prevent deadlocks
> > + * when multiple threads call landlock_restrict_self() simultaneously.
> > + */
> > + if (down_write_killable(¤t->signal->exec_update_lock))
> > + return -EINTR;
> > +
> > /*
> > * We schedule a pseudo-signal task_work for each of the calling task's
> > * sibling threads. In the task work, each thread:
> > @@ -556,6 +563,7 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred,
> > wait_for_completion(&shared_ctx.all_finished);
> >
> > tsync_works_release(&works);
> > + up_write(¤t->signal->exec_update_lock);
> >
> > return atomic_read(&shared_ctx.preparation_error);
> > }
> > --
> > 2.51.0
> >
>
> Thank you!
>
> Reviewed-by: Günther Noack <gnoack@google.com>
Hello Yihan Ding!
Apologies, I have to take this back -- applying the patch in this form
would be a mistake. When I tried this out with the Syzkaller test
case, I noticed that the tests started taking multiple seconds per
run. The way I reproduced it was by running the Syzkaller reproducer
under Qemu and looking for the frequency of the "executing program"
lines that it prints for each test run.
When I looked deeper, what was happening was actually that we got
ourselves into a deadlock again, which, in hindsight should have been
obvious: When two threads call landlock_restrict_self() roughly at the
same time, then the one that grabs the lock first will (a) keep the
other (killably) blocked on the lock acquisition, and (b) later ask
the other thread to run a task work. But in order to run a task work,
the blocked thread must first return from the syscall. However,
down_write_killable() only returns when either the lock is available
or when the thread was killed.
To resolve this, we need to actually use a lock acquisition that
respects other ways of interruption as well; we can either use a
down_write_trylock() and return -ERESTARTNOINTR, or we can use
down_write_interruptible().
Sorry for the poor advice to use the _killable variant earlier. Could
I ask you to please send another revision using _trylock() or
_interruptible()?
Thanks,
–Günther
^ permalink raw reply
* Re: [PATCH v5] ima_fs: Avoid creating measurement lists for unsupported hash algos
From: Mimi Zohar @ 2026-02-25 20:36 UTC (permalink / raw)
To: dima, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Paul Moore,
James Morris, Serge E. Hallyn, Silvia Sisinni, Enrico Bravi
Cc: Jonathan McDowell, linux-integrity, linux-security-module,
linux-kernel, stable, Dmitry Safonov
In-Reply-To: <20260223-ima-oob-v5-1-91cc1064e767@arista.com>
On Mon, 2026-02-23 at 14:56 +0000, Dmitry Safonov via B4 Relay wrote:
> From: Dmitry Safonov <dima@arista.com>
>
> ima_tpm_chip->allocated_banks[i].crypto_id is initialized to
> HASH_ALGO__LAST if the TPM algorithm is not supported. However there
> are places relying on the algorithm to be valid because it is accessed
> by hash_algo_name[].
If the TPM algorithm is not supported by whom? the kernel? HASH_ALGO__LAST is
defined in linux/hash_info.h. If the crypto algorithm is not supported by the
kernel, then the kernel won't be able to calculate the hash to extend the TPM.
> @@ -404,16 +398,24 @@ static int __init create_securityfs_measurement_lists(void)
> char file_name[NAME_MAX + 1];
> struct dentry *dentry;
>
> - sprintf(file_name, "ascii_runtime_measurements_%s",
> - hash_algo_name[algo]);
> + if (algo == HASH_ALGO__LAST)
> + sprintf(file_name, "ascii_runtime_measurements_tpm_alg_%x",
> + ima_tpm_chip->allocated_banks[i].alg_id);
> + else
> + sprintf(file_name, "ascii_runtime_measurements_%s",
> + hash_algo_name[algo]);
> dentry = securityfs_create_file(file_name, S_IRUSR | S_IRGRP,
> ima_dir, (void *)(uintptr_t)i,
> &ima_ascii_measurements_ops);
> if (IS_ERR(dentry))
> return PTR_ERR(dentry);
>
> - sprintf(file_name, "binary_runtime_measurements_%s",
> - hash_algo_name[algo]);
> + if (algo == HASH_ALGO__LAST)
> + sprintf(file_name, "binary_runtime_measurements_tpm_alg_%x",
> + ima_tpm_chip->allocated_banks[i].alg_id);
There's no point in creating either of the securityfs files if the kernel
doesn't support the hash algorithm.
Mimi
> + else
> + sprintf(file_name, "binary_runtime_measurements_%s",
> + hash_algo_name[algo]);
> dentry = securityfs_create_file(file_name, S_IRUSR | S_IRGRP,
> ima_dir, (void *)(uintptr_t)i,
> &ima_measurements_ops);
^ permalink raw reply
* Re: [PATCH v5] ima_fs: Avoid creating measurement lists for unsupported hash algos
From: Mimi Zohar @ 2026-02-25 20:07 UTC (permalink / raw)
To: dima, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Paul Moore,
James Morris, Serge E. Hallyn, Silvia Sisinni, Enrico Bravi
Cc: Jonathan McDowell, linux-integrity, linux-security-module,
linux-kernel, stable, Dmitry Safonov
In-Reply-To: <20260223-ima-oob-v5-1-91cc1064e767@arista.com>
On Mon, 2026-02-23 at 14:56 +0000, Dmitry Safonov via B4 Relay wrote:
> From: Dmitry Safonov <dima@arista.com>
>
> ima_tpm_chip->allocated_banks[i].crypto_id is initialized to
> HASH_ALGO__LAST if the TPM algorithm is not supported. However there
> are places relying on the algorithm to be valid because it is accessed
> by hash_algo_name[].
>
> On 6.12.40 I observe the following read out-of-bounds in hash_algo_name:
> ==================================================================
> BUG: KASAN: global-out-of-bounds in create_securityfs_measurement_lists+0x396/0x440
> Read of size 8 at addr ffffffff83e18138 by task swapper/0/1
>
> CPU: 4 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.40 #3
> Call Trace:
> <TASK>
> dump_stack_lvl+0x61/0x90
> print_report+0xc4/0x580
> ? kasan_addr_to_slab+0x26/0x80
> ? create_securityfs_measurement_lists+0x396/0x440
> kasan_report+0xc2/0x100
> ? create_securityfs_measurement_lists+0x396/0x440
> create_securityfs_measurement_lists+0x396/0x440
> ima_fs_init+0xa3/0x300
> ima_init+0x7d/0xd0
> init_ima+0x28/0x100
> do_one_initcall+0xa6/0x3e0
> kernel_init_freeable+0x455/0x740
> kernel_init+0x24/0x1d0
> ret_from_fork+0x38/0x80
> ret_from_fork_asm+0x11/0x20
> </TASK>
>
> The buggy address belongs to the variable:
> hash_algo_name+0xb8/0x420
>
> Memory state around the buggy address:
> ffffffff83e18000: 00 01 f9 f9 f9 f9 f9 f9 00 01 f9 f9 f9 f9 f9 f9
> ffffffff83e18080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >ffffffff83e18100: 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 00 05 f9 f9
> ^
> ffffffff83e18180: f9 f9 f9 f9 00 00 00 00 00 00 00 04 f9 f9 f9 f9
> ffffffff83e18200: 00 00 00 00 00 00 00 00 04 f9 f9 f9 f9 f9 f9 f9
> ==================================================================
>
> Seems like the TPM chip supports sha3_256, which isn't yet in
> tpm_algorithms:
> tpm tpm0: TPM with unsupported bank algorithm 0x0027
>
> Thus solve the problem by creating a file name with "_tpm_alg_<ID>"
> postfix if the crypto algorithm isn't initialized.
>
> This is how it looks on the test machine (patch ported to v6.12 release):
> # ls -1 /sys/kernel/security/ima/
> ascii_runtime_measurements
> ascii_runtime_measurements_tpm_alg_27
> ascii_runtime_measurements_sha1
> ascii_runtime_measurements_sha256
> binary_runtime_measurements
> binary_runtime_measurements_tpm_alg_27
> binary_runtime_measurements_sha1
> binary_runtime_measurements_sha256
> policy
> runtime_measurements_count
> violations
When reposting this patch, on top of Roberto's patch, please include the name of
the TCG document, or a link to it, defining the algorithm id number here in the
patch description.
thanks,
Mimi
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox