linux/fs
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
..
9p [PATCH] v9fs: add readpage support 2006-01-18 19:20:22 -08:00
adfs
affs
afs add loglevel to printk in fs/afs/cmservice.c 2006-01-11 01:52:40 +01:00
autofs [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
autofs4 [PATCH] autofs4 oops fix 2006-01-14 18:25:19 -08:00
befs
bfs
cifs [PATCH] turn "const static" into "static const" 2006-01-10 08:01:55 -08:00
coda
configfs
cramfs
debugfs
devfs
devpts
efs return statement cleanup - kill pointless parentheses 2006-01-15 02:37:08 +01:00
exportfs [PATCH] exportfs: add find_acceptable_alias helper 2006-01-18 19:20:28 -08:00
ext2 [PATCH] ext2: remove d_splice_alias NULL check from ext2_lookup 2006-01-14 18:27:10 -08:00
ext3 [PATCH] ext3: remove d_splice_alias NULL check from ext3_lookup 2006-01-14 18:27:10 -08:00
fat [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
freevxfs
fuse [PATCH] fuse: fix bitfield race 2006-01-16 23:15:31 -08:00
hfs [PATCH] hfs: cleanup HFS prints 2006-01-18 19:20:23 -08:00
hfsplus [PATCH] hfs: set type/creator for symlinks 2006-01-18 19:20:23 -08:00
hostfs
hpfs
hppfs
hugetlbfs [PATCH] Add tmpfs options for memory placement policies 2006-01-14 18:27:07 -08:00
isofs [PATCH] isofs: remove d_splice_alias NULL check from isofs_lookup 2006-01-14 18:27:12 -08:00
jbd [PATCH] jbd: remove_transaction fix 2006-01-18 19:20:16 -08:00
jffs
jffs2 [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
jfs [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
lockd [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
minix
msdos
ncpfs [PATCH] ncpfs: remove kmalloc wrapper 2006-01-14 18:27:12 -08:00
nfs [PATCH] per-mountpoint noatime/nodiratime 2006-01-10 08:01:34 -08:00
nfs_common
nfsd [PATCH] knfsd: Provide missing NFSv2 part of patch for checking vfs_getattr. 2006-01-18 19:20:28 -08:00
nls
ntfs [PATCH] ntfs: remove superflous MS_NOATIME/MS_NODIRATIME assignments 2006-01-10 08:01:33 -08:00
ocfs2 [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
openpromfs
partitions [PATCH] partitions: Read Rio Karma partition table 2006-01-16 23:15:29 -08:00
proc [PATCH] convert /proc/devices to use seq_file interface 2006-01-14 18:25:19 -08:00
qnx4
ramfs
reiserfs [PATCH] reiserfs: remove d_splice_alias NULL check from reiserfs_lookup 2006-01-14 18:27:12 -08:00
relayfs
romfs
smbfs [PATCH] smbfs: remove kmalloc wrapper 2006-01-14 18:27:13 -08:00
sysfs [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
sysv correct email address of Manfred Spraul 2006-01-15 02:43:54 +01:00
udf [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
ufs [PATCH] ufs cleanup 2006-01-14 10:27:32 -08:00
vfat
xfs [XFS] Fix a race in xfs_submit_ioend() where we can be completing I/O for 2006-01-18 13:38:12 +11:00
aio.c
attr.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c [PATCH] fs/binfmt_elf: Remove unneeded kmalloc() return value casts 2006-01-10 08:02:01 -08:00
binfmt_elf.c [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
binfmt_em86.c
binfmt_flat.c [PATCH] uclinux: delay binfmt_flat trace 2006-01-10 09:31:27 -08:00
binfmt_misc.c [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
binfmt_script.c
binfmt_som.c
bio.c [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
block_dev.c
buffer.c Make alloc_page_buffers() initialise buffer_heads using init_buffer(), 2006-01-17 09:02:07 +11:00
char_dev.c [PATCH] convert /proc/devices to use seq_file interface 2006-01-14 18:25:19 -08:00
compat_ioctl.c [PATCH] Implement ioctl emulation for the parport character device 2006-01-12 09:08:49 -08:00
compat.c [PATCH] vfs: *at functions: core 2006-01-18 19:20:29 -08:00
dcache.c [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
dcookies.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
direct-io.c
dnotify.c
dquot.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
drop_caches.c
eventpoll.c
exec.c [PATCH] vfs: *at functions: core 2006-01-18 19:20:29 -08:00
fcntl.c [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
fifo.c
file_table.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
file.c
filesystems.c
fs-writeback.c
inode.c [PATCH] per-mountpoint noatime/nodiratime 2006-01-10 08:01:34 -08:00
inotify.c [PATCH] add missing syscall declarations 2006-01-18 19:20:22 -08:00
ioctl.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
ioprio.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
mpage.c
namei.c [PATCH] vfs: *at functions: core 2006-01-18 19:20:29 -08:00
namespace.c [PATCH] add /sys/fs 2006-01-16 23:15:29 -08:00
nfsctl.c
open.c [PATCH] vfs: *at functions: core 2006-01-18 19:20:29 -08:00
pipe.c [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
pnode.c
pnode.h
posix_acl.c
quota_v1.c
quota_v2.c [PATCH] quota: make useless quota error message informative 2006-01-14 18:27:12 -08:00
quota.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
read_write.c
readdir.c
select.c
seq_file.c
stat.c [PATCH] vfs: *at functions: core 2006-01-18 19:20:29 -08:00
super.c
xattr_acl.c
xattr.c