Thread (101 messages) 101 messages, 21 authors, 2026-02-27

Re: [PATCH 01/61] vfs: widen inode hash/lookup functions to u64

From: Damien Le Moal <dlemoal@kernel.org>
Date: 2026-02-26 22:56:42
Also in: amd-gfx, autofs, ceph-devel, dri-devel, linux-cifs, linux-ext4, linux-f2fs-devel, linux-fscrypt, linux-fsdevel, linux-hams, linux-integrity, linux-media, linux-mm, linux-nfs, linux-perf-users, linux-trace-kernel, linux-unionfs, linux-xfs, lkml, netdev, netfs, ntfs3, nvdimm, ocfs2-devel, selinux, v9fs

On 2/27/26 00:55, Jeff Layton wrote:
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>
[...]
quoted hunk ↗ jump to hunk
-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,
Hmmm. the type of ino in struct inode is changed in patch 2, not this patch. So
this feels incorrect. Why not just squash patch 2 in here ?

While at it, maybe you could change this to use pr_debug() too ?

-- 
Damien Le Moal
Western Digital Research
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help