From 11f60a62a1d7633e9a8ec62da18ed9ababa694df Mon Sep 17 00:00:00 2001 From: Steven Danneman Date: Mon, 26 Jan 2009 20:14:32 -0800 Subject: 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/modules/vfs_default.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/modules/vfs_default.c') diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index cb56690dbb..4b123ab03e 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -210,7 +210,6 @@ static void vfswrap_init_search_op(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp) { /* Default behavior is a NOOP */ - return; } /* File operations */ @@ -1456,7 +1455,7 @@ static vfs_op_tuple vfs_default_ops[] = { SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_closedir), SMB_VFS_OP_CLOSEDIR, SMB_VFS_LAYER_OPAQUE}, - {SMB_VFS_OP(vfswrap_init_search_op), SMB_VFS_OP_INIT_SEARCH_OP, + {SMB_VFS_OP(vfswrap_init_search_op), SMB_VFS_OP_INIT_SEARCH_OP, SMB_VFS_LAYER_OPAQUE}, /* File operations */ -- cgit