s3: OneFS bulk directory enumeration support
commit11f60a62a1d7633e9a8ec62da18ed9ababa694df
authorSteven Danneman <steven.danneman@isilon.com>
Tue, 27 Jan 2009 04:14:32 +0000 (26 20:14 -0800)
committerSteven Danneman <steven.danneman@isilon.com>
Tue, 10 Feb 2009 07:56:17 +0000 (9 23:56 -0800)
treecbf46c95dd109ef73e08ef2fba676268dbaa5943
parent6272f4c2f453c509b8a3893d4c2ac5fc356b348d
s3: OneFS bulk directory enumeration support

OneFS provides the bulk directory enumeration syscall readdirplus().  This
syscall has the same semantics as the NFSv3 READDIRPLUS command, returning
a batch of directory entries with prefetched stat information via one
syscall.

This commit wraps the readdirplus() call in the existing POSIX
readdir/seekdir VFS interface.  By default a batch of 128 directory entries
are optimistically read from the kernel into a global cache, and fed to
iterative calls of VFS_OP_READDIR.

The global buffers could be avoided in the future by hanging connection
specific buffers off the conn struct.

Added new parameter "onefs:use readdirplus" which toggles usage of this
code on or off.
source3/Makefile.in
source3/include/vfs.h
source3/modules/onefs.h
source3/modules/onefs_dir.c [new file with mode: 0644]
source3/modules/vfs_default.c
source3/modules/vfs_onefs.c