Re: [PATCH v3 12/12] treewide: change inode->i_ino from unsigned long to u64
Damien Le Moal <[email protected]> Thu, 5 Mar 2026 06:41:21 +0900
| Newsgroups | gmane.comp.file-systems.ext4,gmane.linux.file-systems,gmane.linux.kernel,gmane.linux.kernel.mm,gmane.linux.file-systems.f2fs,gmane.linux.nfs,gmane.linux.kernel.cifs,gmane.network.samba.internals,gmane.comp.file-systems.nilfs.user,gmane.linux.kernel.autofs,gmane.comp.file-systems.ceph.devel,gmane.comp.file-systems.coda.general,gmane.comp.file-systems.ecryptfs.general,gmane.linux.drivers.mtd,gmane.linux.file-systems.union,gmane.comp.security.apparmor,gmane.linux.kernel.lsm,gmane.comp.freedesktop.amd-gfx,gmane.comp.video.dri.devel,gmane.linux.drivers.video-input-infrastructure,gmane.linux.network,gmane.linux.kernel.perf.user,gmane.linux.hams,gmane.linux.x25,gmane.linux.bluez.kernel,gmane.linux.can,gmane.linux.kernel.bpf |
|---|---|
| Organization | Western Digital Research |
| Message-ID | <[email protected]> |
On 3/5/26 00:32, Jeff Layton wrote: > On 32-bit architectures, unsigned long is only 32 bits wide, which > causes 64-bit inode numbers to be silently truncated. Several > filesystems (NFS, XFS, BTRFS, etc.) can generate inode numbers that > exceed 32 bits, and this truncation can lead to inode number collisions > and other subtle bugs on 32-bit systems. > > Change the type of inode->i_ino from unsigned long to u64 to ensure that > inode numbers are always represented as 64-bit values regardless of > architecture. Update all format specifiers treewide from %lu/%lx to > %llu/%llx to match the new type, along with corresponding local variable > types. > > This is the bulk treewide conversion. Earlier patches in this series > handled trace events separately to allow trace field reordering for > better struct packing on 32-bit. > > Signed-off-by: Jeff Layton <[email protected]> For the zonefs bits: Acked-by: Damien Le Moal <[email protected]> -- Damien Le Moal Western Digital Research