kernel-ark/arch/sparc/kernel
David Howells afefdbb28a [PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers
These patches make the kernel pass 64-bit inode numbers internally when
communicating to userspace, even on a 32-bit system.  They are required
because some filesystems have intrinsic 64-bit inode numbers: NFS3+ 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.

This patch:

Make filldir_t take a 64-bit inode number and struct kstat carry a 64-bit
inode number so that 64-bit inode numbers can be passed back to userspace.

The stat functions then returns the full 64-bit inode number where
available and where possible.  If it is not possible to represent the inode
number supplied by the filesystem in the field provided by userspace, then
error EOVERFLOW will be issued.

Similarly, the getdents/readdir functions now pass the full 64-bit inode
number to userspace where possible, returning EOVERFLOW instead when a
directory entry is encountered that can't be properly represented.

Note that this means that some inodes will not be stat'able on a 32-bit
system with old libraries where they were before - but it does mean that
there will be no ambiguity over what a 32-bit inode number refers to.

Note similarly that directory scans may be cut short with an error on a
32-bit system with old libraries where the scan would work before for the
same reasons.

It is judged unlikely that this situation will occur because modern glibc
uses 64-bit capable versions of stat and getdents class functions
exclusively, and that older systems are unlikely to encounter
unrepresentable inode numbers anyway.

[akpm: alpha build fix]
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-03 08:03:40 -07:00
..
apc.c
asm-offsets.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
auxio.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cpu.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
devices.c [SPARC]: Simplify and correct __cpu_find_by() 2006-07-21 14:18:15 -07:00
ebus.c [PATCH] fix ancient breakage in ebus_init() 2006-09-22 17:48:56 -07:00
entry.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
errtbls.c
etrap.S
head.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
idprom.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
ioport.c [PATCH] sun4: fix sbus_setup_iommu() 2006-09-22 17:48:57 -07:00
irq.c [SPARC]: Do not call sun4m_irq_rotate on sun4d. 2006-07-21 14:18:18 -07:00
led.c
Makefile [SPARC]: Port of_device layer and make ebus use it. 2006-06-23 23:15:47 -07:00
module.c
muldiv.c
of_device.c [SPARC]: Fix initialization of sun4d SBUS interrupts. 2006-07-21 14:18:11 -07:00
pcic.c [PATCH] kill wall_jiffies 2006-10-01 00:39:27 -07:00
pmc.c
process.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
prom.c [SPARC]: Fix property name acquisition in prom.c 2006-07-21 14:18:04 -07:00
ptrace.c
rtrap.S
sclow.S
semaphore.c
setup.c [SPARC]: enabling of the 2nd CPU in 2.6.18-rc4 2006-08-26 17:52:51 -07:00
signal.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
smp.c [SPARC]: Small smp cleanup. 2006-08-26 17:52:56 -07:00
sparc_ksyms.c [SPARC]: Kill prom_getname, unused and not implemented properly. 2006-07-21 14:17:55 -07:00
sparc-stub.c
sun4c_irq.c [PATCH] irq-flags: SPARC: Use the new IRQF_ constants 2006-07-02 13:58:48 -07:00
sun4d_irq.c [PATCH] irq-flags: SPARC: Use the new IRQF_ constants 2006-07-02 13:58:48 -07:00
sun4d_smp.c [SPARC]: Small smp cleanup. 2006-08-26 17:52:56 -07:00
sun4m_irq.c [PATCH] irq-flags: SPARC: Use the new IRQF_ constants 2006-07-02 13:58:48 -07:00
sun4m_smp.c [SPARC]: Small smp cleanup. 2006-08-26 17:52:56 -07:00
sun4setup.c
sunos_asm.S
sunos_ioctl.c
sys_solaris.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sys_sparc.c [PATCH] provide kernel_execve on all architectures 2006-10-02 07:57:23 -07:00
sys_sunos.c [PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers 2006-10-03 08:03:40 -07:00
systbls.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
tadpole.c
tick14.c [PATCH] irq-flags: SPARC: Use the new IRQF_ constants 2006-07-02 13:58:48 -07:00
time.c [PATCH] kill wall_jiffies 2006-10-01 00:39:27 -07:00
trampoline.S
traps.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
unaligned.c
vmlinux.lds.S
windows.c
wof.S
wuf.S