Thread (176 messages) 176 messages, 16 authors, 2026-03-04

[f2fs-dev] [PATCH v2 060/110] vfs: change kino_t from unsigned long to u64

From: Jeff Layton via Linux-f2fs-devel <hidden>
Date: 2026-03-02 20:39:23
Also in: amd-gfx, autofs, bpf, ceph-devel, dri-devel, linux-bluetooth, linux-can, linux-cifs, linux-ext4, linux-fscrypt, linux-fsdevel, linux-hams, linux-integrity, linux-media, linux-mm, linux-nfs, linux-perf-users, linux-sctp, linux-security-module, linux-trace-kernel, linux-unionfs, linux-xfs, lkml, netdev, netfs, ntfs3, nvdimm, ocfs2-devel, selinux, v9fs
Subsystem: filesystems (vfs and infrastructure), the rest · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds

Change kino_t from unsigned long to u64, and update PRIino from "l"
to "ll" accordingly. This is the actual type widening of i_ino.

All format strings have already been converted to use PRIino, so this
change compiles warning-free on both 32-bit and 64-bit architectures.

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d0c4789838b5852111583a3e4cced88999496e68..4193817e02e8bf94f29514ca43379af21f37ac61 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -758,8 +758,8 @@ struct inode_state_flags {
 	enum inode_state_flags_enum __state;
 };
 
-typedef unsigned long	kino_t;
-#define PRIino		"l"
+typedef u64		kino_t;
+#define PRIino		"ll"
 
 /*
  * Keep mostly read-only and often accessed (especially for
-- 
2.53.0



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help