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