Skip to content

Use 64-bit inode numbers internally in the kernel

David Howells linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Provide fallback full 64-bit divide/modulus ops for gccinclude/linux/kernel.h lib/Makefile lib/__udivdi3.c +2 more+152 -15 replies
2/4VFS: Make inode numbers 64-bitsinclude/asm-alpha/posix_types.h include/asm-arm/posix_types.h include/asm-arm26/posix_types.h +24 more+28 -288 replies
3/4VFS: Clear up u-long-long ino_t print format warningsfs/9p/vfs_inode.c fs/afs/dir.c fs/bfs/dir.c +66 more+256 -2550 replies
4/4VFS: Fix 64-bit ino_t warning in CacheFiles facilityfs/cachefiles/cf-interface.c fs/cachefiles/cf-namei.c fs/cachefiles/cf-xattr.c+16 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Use 64-bit inode numbers internally in the kernel

These patches make the kernel use 64-bit inode numbers internally, even on a 32-bit system. They are required because some filesystems have intrinsic 64-bit inode numbers: NFS and XFS for example. The 64-bit inode numbers are then propagated to userspace automatically where the arch supports it.

Problems have been seen with userspace (eg: ld.so) using the 64-bit inode number returned by stat64() or getdents64() to differentiate files, and failing because the 64-bit inode number space was compressed to 32-bits, and so overlaps occur.

There are four patches:

(1) Supply __udivdi3() and __umoddi3() so that the compiler can do 64-bit division and modulus. __udivmoddi4() is also supplied as the other two are wrappers around that.

(2) Make __kernel_ino_t consistently typedef'd to "unsigned long long" on all archs.

Where ino_t has been used in userspace facing structures (such as struct stat), it has been replaced with whatever ino_t used to be defined as on that arch.

struct inode::i_ino and struct kstat::ino are changed to ino_t type.

(3) Fix print format warnings in general code due to the change in type of i_ino. These should now all carry an "ll" modifier.

(4) As for (3), but fix the CacheFiles code.

David