Centos-kernel-stream-9/include/linux
Ulrich Drepper 5590ff0d55 [PATCH] vfs: *at functions: core
Here is a series of patches which introduce in total 13 new system calls
which take a file descriptor/filename pair instead of a single file
name.  These functions, openat etc, have been discussed on numerous
occasions.  They are needed to implement race-free filesystem traversal,
they are necessary to implement a virtual per-thread current working
directory (think multi-threaded backup software), etc.

We have in glibc today implementations of the interfaces which use the
/proc/self/fd magic.  But this code is rather expensive.  Here are some
results (similar to what Jim Meyering posted before).

The test creates a deep directory hierarchy on a tmpfs filesystem.  Then
rm -fr is used to remove all directories.  Without syscall support I get
this:

real    0m31.921s
user    0m0.688s
sys     0m31.234s

With syscall support the results are much better:

real    0m20.699s
user    0m0.536s
sys     0m20.149s

The interfaces are for obvious reasons currently not much used.  But they'll
be used.  coreutils (and Jeff's posixutils) are already using them.
Furthermore, code like ftw/fts in libc (maybe even glob) will also start using
them.  I expect a patch to make follow soon.  Every program which is walking
the filesystem tree will benefit.

Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@ftp.linux.org.uk>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:29 -08:00
..
amba
byteorder
dvb DVB (2444): Implement frontend-specific tuning and the ability to disable zigzag 2006-01-09 15:25:07 -02:00
hdlc
isdn
lockd
mmc [MMC] Indicate that R1/R1b contains command opcode 2006-01-09 22:51:46 +00:00
mtd
netfilter [NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables 2006-01-12 14:06:43 -08:00
netfilter_arp [NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables 2006-01-12 14:06:43 -08:00
netfilter_bridge
netfilter_ipv4 [NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables 2006-01-12 14:06:43 -08:00
netfilter_ipv6 [NETFILTER] ip6tables: remove unused definitions 2006-01-17 02:39:19 -08:00
nfsd [PATCH] nfsd4: rename lk_stateowner 2006-01-18 19:20:24 -08:00
raid
spi [PATCH] spi: remove fastcall crap 2006-01-13 16:29:56 -08:00
sunrpc [PATCH] svcrpc: save and restore the daddr field when request deferred 2006-01-18 19:20:24 -08:00
tc_act
tc_ematch
8250_pci.h
a.out.h
ac97_codec.h
acct.h
acpi.h
adb.h
adfs_fs.h
adfs_fs_i.h
adfs_fs_sb.h
affs_fs.h
affs_hardblocks.h
agp_backend.h
agpgart.h
aio.h
aio_abi.h
amifd.h
amifdreg.h
amigaffs.h
apm_bios.h
arcdevice.h
arcfb.h
ata.h
atalk.h [PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1 2006-01-08 20:14:07 -08:00
atm.h
atm_eni.h
atm_he.h
atm_idt77105.h
atm_nicstar.h
atm_suni.h
atm_tcp.h
atm_zatm.h
atmapi.h
atmarp.h
atmbr2684.h
atmclip.h
atmdev.h
atmioc.h
atmlec.h
atmmpc.h
atmppp.h
atmsap.h
atmsvc.h
attribute_container.h
audit.h
auto_fs.h
auto_fs4.h
auxvec.h [PATCH] Increase AT_VECTOR_SIZE 2006-01-13 09:12:21 -08:00
awe_voice.h
ax25.h
b1lli.h
b1pcmcia.h
backing-dev.h
backlight.h
baycom.h
bcd.h
bfs_fs.h
binfmts.h
bio.h
bit_spinlock.h
bitmap.h
bitops.h
blkdev.h Merge branch 'blk-softirq' of git://brick.kernel.dk/data/git/linux-2.6-block 2006-01-09 09:26:40 -08:00
blkpg.h
blockgroup_lock.h
bootmem.h
bpqether.h
buffer_head.h
cache.h [PARISC] Add __read_mostly section for parisc 2006-01-10 20:35:03 -05:00
calc64.h [PATCH] hrtimer: move div_long_long_rem out of jiffies.h 2006-01-10 08:01:35 -08:00
capability.h [PATCH] move capable() to capability.h 2006-01-11 18:42:13 -08:00
capi.h
cciss_ioctl.h
cd1400.h
cdev.h
cdk.h
cdrom.h
chio.h
circ_buf.h
clk.h
cm4000_cs.h
cn_proc.h
cobalt-nvram.h
coda.h
coda_cache.h
coda_fs_i.h
coda_linux.h
coda_proc.h
coda_psdev.h
coff.h
com20020.h
compat.h
compat_ioctl.h [PATCH] sanitize building of fs/compat_ioctl.c 2006-01-10 08:01:33 -08:00
compiler-gcc.h [PATCH] Work around ppc64 compiler bug 2006-01-10 08:32:35 -08:00
compiler-gcc3.h [PATCH] Make __always_inline actually force always inlining 2006-01-14 18:27:15 -08:00
compiler-gcc4.h [PATCH] When CONFIG_CC_OPTIMIZE_FOR_SIZE, allow gcc4 to control inlining 2006-01-14 18:27:16 -08:00
compiler-intel.h
compiler.h
completion.h
comstats.h
concap.h
config.h
configfs.h
connector.h
console.h
console_struct.h
consolemap.h
cpu.h
cpufreq.h
cpumask.h
cpuset.h [PATCH] cpuset oom lock fix 2006-01-14 18:27:10 -08:00
cramfs_fs.h
cramfs_fs_sb.h
crash_dump.h
crc-ccitt.h
crc16.h
crc32.h
crc32c.h
crypto.h [CRYPTO] Allow multiple implementations of the same algorithm 2006-01-09 14:15:37 -08:00
cryptohash.h
ctype.h
cuda.h
cyclades.h
cyclomx.h
cycx_cfm.h
cycx_drv.h
cycx_x25.h [PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1 2006-01-08 20:14:07 -08:00
dcache.h
dccp.h
dcookies.h
debugfs.h
delay.h
devfs_fs.h
devfs_fs_kernel.h
device-mapper.h
device.h [PATCH] Add bus_type probe, remove, shutdown methods. 2006-01-13 11:26:04 -08:00
devpts_fs.h
dio.h
dirent.h
divert.h
dm-ioctl.h
dm9000.h
dma-mapping.h
dmapool.h
dmi.h [PATCH] x86_64: Generalize DMI and enable for x86-64 2006-01-11 19:04:51 -08:00
dn.h
dnotify.h
dqblk_v1.h
dqblk_v2.h
dqblk_xfs.h
ds1286.h
ds1742rtc.h
ds17287rtc.h
dtlk.h
edd.h
efi.h
efs_dir.h
efs_fs.h
efs_fs_i.h
efs_fs_sb.h
efs_vh.h
eisa.h
elevator.h s/assoicated/associated/ 2006-01-10 00:09:36 +01:00
elf-fdpic.h
elf.h
elfcore.h
err.h
errno.h
errqueue.h
etherdevice.h
ethtool.h
eventpoll.h
ext2_fs.h
ext2_fs_sb.h
ext3_fs.h
ext3_fs_i.h [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
ext3_fs_sb.h
ext3_jbd.h
fadvise.h
fb.h [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
fcdevice.h
fcntl.h [PATCH] vfs: *at functions: core 2006-01-18 19:20:29 -08:00
fd.h
fd1772.h
fddidevice.h
fdreg.h
file.h
filter.h
firmware.h
flat.h
font.h
fs.h [PATCH] vfs: *at functions: core 2006-01-18 19:20:29 -08:00
fs_enet_pd.h
fs_struct.h
fsl_devices.h [PATCH] gianfar: Use new PHY_ID_FMT macro 2006-01-12 16:31:52 -05:00
fsnotify.h
ftape-header-segment.h
ftape-vendors.h
ftape.h
fuse.h
futex.h
gameport.h
gen_stats.h
genalloc.h
generic_serial.h
genetlink.h
genhd.h
gfp.h [PATCH] x86_64: Handle unknown node (-1) in alloc_pages_node 2006-01-11 19:04:51 -08:00
hardirq.h [PATCH] s390: cputime misaccounting 2006-01-14 18:27:09 -08:00
harrier_defs.h
hash.h
hayesesp.h
hdlc.h
hdlcdrv.h
hdpu_features.h
hdreg.h
hdsmart.h
hiddev.h
highmem.h
highuid.h
hil.h
hil_mlc.h
hippidevice.h
hp_sdc.h
hpet.h
hpfs_fs.h
hrtimer.h [hrtimer] Enforce resolution as lower limit of intervals 2006-01-12 11:47:34 +01:00
hugetlb.h
hwmon-sysfs.h
hwmon-vid.h
hwmon.h
hysdn_if.h
i2c-algo-bit.h
i2c-algo-ite.h
i2c-algo-pca.h
i2c-algo-pcf.h
i2c-algo-sgi.h
i2c-algo-sibyte.h
i2c-dev.h
i2c-id.h V4L/DVB (3365): i2c ids for upd64031a saa717x upd64083 wm8739 2006-01-15 09:02:44 -02:00
i2c-isa.h
i2c-pxa.h
i2c.h
i2o-dev.h
i2o.h
i8k.h
ibmtr.h
icmp.h
icmpv6.h
ide.h [PATCH] Add ide_bus_type probe and remove methods 2006-01-13 11:26:10 -08:00
idr.h
if.h
if_arcnet.h
if_arp.h
if_bonding.h
if_bridge.h
if_cablemodem.h
if_ec.h
if_eql.h
if_ether.h [TIPC] Move ethernet protocol id to linux/if_ether.h 2006-01-18 00:45:15 +01:00
if_fc.h
if_fddi.h
if_frad.h [PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1 2006-01-08 20:14:07 -08:00
if_hippi.h
if_infiniband.h
if_ltalk.h
if_packet.h
if_plip.h
if_ppp.h
if_pppox.h
if_shaper.h
if_slip.h
if_strip.h
if_tr.h
if_tun.h
if_tunnel.h
if_vlan.h
if_wanpipe.h
if_wanpipe_common.h
igmp.h
in.h
in6.h
in_route.h
inet.h
inet_diag.h
inetdevice.h
init.h [PATCH] x86_64: add __meminit for memory hotplug 2006-01-16 23:18:35 -08:00
init_task.h
initrd.h
inotify.h
input.h
interrupt.h [SCSI] Kill the SCSI softirq handling 2006-01-09 16:03:03 +01:00
ioc3.h [PATCH] Altix: ioc3 serial support 2006-01-14 18:25:20 -08:00
ioc4.h
ioctl.h
ioctl32.h
ioport.h
ioprio.h
ip.h
ip6_tunnel.h
ip_mp_alg.h
ipc.h
ipmi.h
ipmi_msgdefs.h
ipmi_smi.h
ipsec.h
ipv6.h
ipv6_route.h
ipx.h
irda.h
irq.h
irq_cpustat.h
isapnp.h
isdn.h
isdn_divertif.h
isdn_ppp.h
isdnif.h [PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1 2006-01-08 20:14:07 -08:00
isicom.h [PATCH] char/isicom: More whitespaces and coding style 2006-01-10 08:02:01 -08:00
iso_fs.h
istallion.h
ite_gpio.h
ixjuser.h
jbd.h
jffs.h
jffs2.h
jffs2_fs_i.h [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
jffs2_fs_sb.h
jhash.h
jiffies.h [PATCH] hrtimer: move div_long_long_rem out of jiffies.h 2006-01-10 08:01:35 -08:00
journal-head.h
joystick.h
kallsyms.h
kbd_diacr.h
kbd_kern.h [PATCH] TTY layer buffering revamp 2006-01-10 08:01:59 -08:00
kd.h
kdev_t.h
kernel.h [IPV6]: Preserve procfs IPV6 address output format 2006-01-17 02:10:53 -08:00
kernel_stat.h
kernelcapi.h
kexec.h [PATCH] sh: kexec() support 2006-01-16 23:15:27 -08:00
key-ui.h
key.h
keyboard.h
keyctl.h
kfifo.h
klist.h
kmalloc_sizes.h
kmod.h
kobj_map.h
kobject.h
kprobes.h [PATCH] kprobes: fix unloading of self probed module 2006-01-11 18:42:12 -08:00
kref.h
kthread.h
ktime.h [hrtimer] Change resolution storage to ktime_t format 2006-01-12 11:36:14 +01:00
lapb.h
lcd.h
libata.h [PATCH] libata: Fix heuristic typos add LBA48PIO flag and support code, add IRQ flag for next diff 2006-01-17 19:37:45 -05:00
libps2.h
limits.h
linkage.h
linux_logo.h
list.h [PATCH] Add list_for_each_entry_safe_reverse() 2006-01-10 08:01:24 -08:00
llc.h
loop.h [PATCH] mutex subsystem, semaphore to completion: drivers/block/loop.c 2006-01-09 15:59:27 -08:00
lp.h
major.h
matroxfb.h
mbcache.h
mc6821.h
mc146818rtc.h
mca-legacy.h
mca.h
memory.h
memory_hotplug.h
mempolicy.h [PATCH] NUMA policies in the slab allocator V2 2006-01-18 19:20:18 -08:00
mempool.h
meye.h
mii.h
minix_fs.h
miscdevice.h
mm.h [PATCH] mark several functions __always_inline 2006-01-14 18:27:15 -08:00
mm_inline.h [PATCH] mm: migration page refcounting fix 2006-01-18 19:20:17 -08:00
mman.h
mmtimer.h
mmzone.h [PATCH] Zone reclaim: Reclaim logic 2006-01-18 19:20:17 -08:00
mod_devicetable.h
module.h
moduleloader.h
moduleparam.h
mount.h [PATCH] per-mountpoint noatime/nodiratime 2006-01-10 08:01:34 -08:00
mpage.h
mqueue.h
mroute.h
msdos_fs.h
msg.h
mtio.h
mutex-debug.h [PATCH] fix/simplify mutex debugging code 2006-01-11 08:14:16 -08:00
mutex.h [PATCH] fix/simplify mutex debugging code 2006-01-11 08:14:16 -08:00
mv643xx.h
n_r3964.h
namei.h [PATCH] vfs: *at functions: core 2006-01-18 19:20:29 -08:00
namespace.h
nbd.h
ncp.h [PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1 2006-01-08 20:14:07 -08:00
ncp_fs.h [PATCH] ncpfs: remove kmalloc wrapper 2006-01-14 18:27:12 -08:00
ncp_fs_i.h
ncp_fs_sb.h
ncp_mount.h
ncp_no.h
net.h
netdevice.h
netfilter.h
netfilter_arp.h
netfilter_bridge.h
netfilter_decnet.h
netfilter_ipv4.h
netfilter_ipv6.h [NETFILTER]: net/ipv[46]/netfilter.c cleanups 2006-01-10 12:54:29 -08:00
netfilter_logging.h
netlink.h
netpoll.h
netrom.h
nfs.h
nfs2.h
nfs3.h
nfs4.h
nfs4_acl.h
nfs4_mount.h
nfs_fs.h
nfs_fs_i.h
nfs_fs_sb.h
nfs_idmap.h
nfs_mount.h
nfs_page.h
nfs_xdr.h
nfsacl.h
nfsd_idmap.h
nls.h
nmi.h
node.h
nodemask.h
notifier.h
nubus.h
numa.h
nvram.h
openprom_fs.h
oprofile.h
page-flags.h
pagemap.h
pagevec.h
param.h
parport.h [PATCH] parport: bring back an unused phase for ppdev ioctl 2006-01-08 20:14:07 -08:00
parport_pc.h
parser.h
patchkey.h
pci-acpi.h
pci.h [PATCH] PCI Error Recovery: header file patch 2006-01-09 12:13:21 -08:00
pci_ids.h [SERIAL] Add 8250 support for Decision Computer International Co. PCCOM2 2006-01-18 11:47:33 +00:00
pci_regs.h
pcieport_if.h
percpu.h
percpu_counter.h
personality.h
pfkeyv2.h Fix "stuct", "strut", "struc" typos 2006-01-15 02:12:54 +01:00
pg.h
phonedev.h
phy.h [PATCH] phy: Added a macro to represent the string format used to match a phy device 2006-01-12 16:31:52 -05:00
pid.h
pipe_fs_i.h [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
pkt_cls.h
pkt_sched.h
pktcdvd.h
platform.h
platform_device.h
pm.h
pm_legacy.h
pmu.h [PATCH] 1/5 powerpc: Rework PowerMac i2c part 1 2006-01-09 15:47:16 +11:00
pnp.h
pnpbios.h
poll.h
posix-timers.h [PATCH] hrtimer: convert posix timers completely 2006-01-10 08:01:39 -08:00
posix_acl.h
posix_acl_xattr.h
posix_types.h
ppdev.h
ppp-comp.h
ppp_channel.h
ppp_defs.h
prctl.h
preempt.h
prefetch.h
prio_tree.h
proc_fs.h [PATCH] powerpc: Add/remove/update properties in /proc/device-tree 2006-01-13 21:02:13 +11:00
profile.h
ps2esdi.h
ptrace.h [PATCH] PTRACE_SYSEMU is only for i386 and clashes with other ptrace codes of other archs 2006-01-08 20:14:04 -08:00
qic117.h
qnx4_fs.h
qnxtypes.h
quota.h
quotaio_v1.h
quotaio_v2.h
quotaops.h
radeonfb.h
radix-tree.h
raid_class.h [SCSI] raid_class.c - adding RAID10 and RAID10 defines 2006-01-12 11:35:15 -06:00
ramfs.h
random.h
raw.h
rbtree.h
rcupdate.h [PATCH] rcu: join rcu_ctrlblk and rcu_state 2006-01-10 08:42:50 -08:00
reboot.h
reboot_fixups.h
reiserfs_acl.h
reiserfs_fs.h [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
reiserfs_fs_i.h
reiserfs_fs_sb.h
reiserfs_xattr.h
relayfs_fs.h
resource.h
rio.h
rio_drv.h [PATCH] DocBook: fix kernel-doc comments 2006-01-10 08:01:53 -08:00
rio_ids.h
rio_regs.h
rmap.h
romfs_fs.h
root_dev.h
rose.h
route.h
rslib.h
rtc.h
rtnetlink.h
rwsem-spinlock.h
rwsem.h
sc26198.h
scatterlist.h
scc.h
sched.h [PATCH] sched: add new SCHED_BATCH policy 2006-01-14 18:25:20 -08:00
screen_info.h [PATCH] vesafb: Drop blank hook 2006-01-10 08:01:42 -08:00
sctp.h
scx200.h
scx200_gpio.h
sdla.h [PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1 2006-01-08 20:14:07 -08:00
sdla_asy.h
sdla_chdlc.h
sdla_fr.h
sdla_ppp.h
sdla_x25.h
sdladrv.h
sdlapci.h
sdlasfm.h
seccomp.h
securebits.h
security.h
selection.h
selinux_netlink.h
sem.h
seq_file.h
seqlock.h
serial.h
serial167.h
serialP.h
serial_8250.h
serial_core.h [SERIAL] convert uart_state.sem to uart_state.mutex 2006-01-13 21:37:07 +00:00
serial_ip3106.h
serial_reg.h
serio.h
shm.h
shmem_fs.h [PATCH] Add tmpfs options for memory placement policies 2006-01-14 18:27:07 -08:00
signal.h
skbuff.h [NET]: Make second arg to skb_reserved() signed. 2006-01-17 02:54:21 -08:00
slab.h
smb.h
smb_fs.h [PATCH] smbfs: remove kmalloc wrapper 2006-01-14 18:27:13 -08:00
smb_fs_i.h
smb_fs_sb.h
smb_mount.h
smbno.h
smp.h
smp_lock.h
snmp.h
socket.h [TIPC] Initial merge 2006-01-12 14:06:31 -08:00
sockios.h
som.h
sonet.h
sonypi.h
sort.h
sound.h
soundcard.h
spinlock.h
spinlock_api_smp.h
spinlock_api_up.h
spinlock_types.h
spinlock_types_up.h
spinlock_up.h
stallion.h
stat.h
statfs.h
stddef.h
stop_machine.h
string.h
stringify.h
superhyway.h
suspend.h
swap.h [PATCH] Zone reclaim: Reclaim logic 2006-01-18 19:20:17 -08:00
swapops.h
synclink.h
sys.h
syscalls.h [PATCH] add missing syscall declarations 2006-01-18 19:20:22 -08:00
sysctl.h [PATCH] Zone reclaim: proc override 2006-01-18 19:20:17 -08:00
sysdev.h
sysfs.h
sysrq.h
sysv_fs.h
tcp.h
telephony.h
termios.h
textsearch.h
textsearch_fsm.h
tfrc.h
thread_info.h
threads.h
ticable.h
time.h [PATCH] vfs: *at functions: core 2006-01-18 19:20:29 -08:00
timer.h [PATCH] hrtimer: switch itimers to hrtimer 2006-01-10 08:01:38 -08:00
times.h
timex.h
tiocl.h
tipc.h [TIPC] Update of file headers 2006-01-12 14:06:38 -08:00
tipc_config.h [TIPC] Updated link priority macros 2006-01-18 00:45:15 +01:00
topology.h [PATCH] Zone reclaim: Reclaim logic 2006-01-18 19:20:17 -08:00
toshiba.h
transport_class.h
trdevice.h
tty.h [PATCH] TTY layer buffering revamp 2006-01-10 08:01:59 -08:00
tty_driver.h
tty_flip.h [PATCH] TTY layer buffering revamp 2006-01-10 08:01:59 -08:00
tty_ldisc.h [PATCH] TTY layer buffering revamp 2006-01-10 08:01:59 -08:00
types.h
udf_fs.h
udf_fs_i.h
udf_fs_sb.h
udp.h
ufs_fs.h
ufs_fs_i.h
ufs_fs_sb.h
uinput.h
uio.h
ultrasound.h
umem.h
un.h
unistd.h
usb.h
usb_cdc.h
usb_ch9.h
usb_gadget.h
usb_gadgetfs.h
usb_input.h
usb_isp116x.h
usb_otg.h
usb_sl811.h
usb_usual.h
usbdevice_fs.h
user.h
utime.h
uts.h
utsname.h
vermagic.h
vfs.h
via.h
video_decoder.h V4L/DVB (3269): ioctls cleanups. 2006-01-09 15:32:31 -02:00
video_encoder.h
videodev.h
videodev2.h V4L/DVB (3269): ioctls cleanups. 2006-01-09 15:32:31 -02:00
videotext.h
vmalloc.h
vt.h
vt_buffer.h
vt_kern.h
wait.h
wanpipe.h
wanrouter.h
watchdog.h
wavefront.h [PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1 2006-01-08 20:14:07 -08:00
wireless.h
workqueue.h
writeback.h
x25.h
x1205.h
xattr.h [PATCH] move xattr permission checks into the VFS 2006-01-10 08:01:29 -08:00
xfrm.h
yam.h
zconf.h
zftape.h
zlib.h [PATCH] lib/zlib*: cleanups 2006-01-10 08:01:57 -08:00
zorro.h
zorro_ids.h
zutil.h