summaryrefslogtreecommitdiff
path: root/source3/modules/onefs.h
diff options
context:
space:
mode:
authorSteven Danneman <steven.danneman@isilon.com>2009-01-26 20:14:32 -0800
committerSteven Danneman <steven.danneman@isilon.com>2009-02-09 23:56:17 -0800
commit11f60a62a1d7633e9a8ec62da18ed9ababa694df (patch)
treecbf46c95dd109ef73e08ef2fba676268dbaa5943 /source3/modules/onefs.h
parent6272f4c2f453c509b8a3893d4c2ac5fc356b348d (diff)
downloadsamba-11f60a62a1d7633e9a8ec62da18ed9ababa694df.tar.gz
samba-11f60a62a1d7633e9a8ec62da18ed9ababa694df.tar.bz2
samba-11f60a62a1d7633e9a8ec62da18ed9ababa694df.zip
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.
Diffstat (limited to 'source3/modules/onefs.h')
-rw-r--r--source3/modules/onefs.h46
1 files changed, 33 insertions, 13 deletions
diff --git a/source3/modules/onefs.h b/source3/modules/onefs.h
index c8f19f4b31..72be682c21 100644
--- a/source3/modules/onefs.h
+++ b/source3/modules/onefs.h
@@ -41,26 +41,28 @@ enum onefs_acl_wire_format
#define PARM_ONEFS_TYPE "onefs"
#define PARM_ACL_WIRE_FORMAT "acl wire format"
#define PARM_ACL_WIRE_FORMAT_DEFAULT ACL_FORMAT_WINDOWS_SD
-#define PARM_SIMPLE_FILE_SHARING_COMPATIBILITY_MODE "simple file sharing compatibility mode"
-#define PARM_SIMPLE_FILE_SHARING_COMPATIBILITY_MODE_DEFAULT false
+#define PARM_ATIME_NOW "atime now files"
+#define PARM_ATIME_STATIC "atime static files"
+#define PARM_ATIME_SLOP "atime now slop"
#define PARM_CREATOR_OWNER_GETS_FULL_CONTROL "creator owner gets full control"
#define PARM_CREATOR_OWNER_GETS_FULL_CONTROL_DEFAULT true
+#define PARM_CTIME_NOW "ctime now files"
+#define PARM_CTIME_SLOP "ctime now slop"
+#define PARM_IGNORE_SACL "ignore sacl"
+#define PARM_IGNORE_SACL_DEFAULT false
+#define PARM_MTIME_NOW "mtime now files"
+#define PARM_MTIME_STATIC "mtime static files"
+#define PARM_MTIME_SLOP "mtime now slop"
+#define PARM_USE_READDIRPLUS "use readdirplus"
+#define PARM_USE_READDIRPLUS_DEFAULT true
+#define PARM_SIMPLE_FILE_SHARING_COMPATIBILITY_MODE "simple file sharing compatibility mode"
+#define PARM_SIMPLE_FILE_SHARING_COMPATIBILITY_MODE_DEFAULT false
#define PARM_UNMAPPABLE_SIDS_DENY_EVERYONE "unmappable sids deny everyone"
#define PARM_UNMAPPABLE_SIDS_DENY_EVERYONE_DEFAULT false
#define PARM_UNMAPPABLE_SIDS_IGNORE "ignore unmappable sids"
#define PARM_UNMAPPABLE_SIDS_IGNORE_DEFAULT false
#define PARM_UNMAPPABLE_SIDS_IGNORE_LIST "unmappable sids ignore list"
#define PARM_UNMAPPABLE_SIDS_IGNORE_LIST_DEFAULT NULL
-#define PARM_IGNORE_SACL "ignore sacl"
-#define PARM_IGNORE_SACL_DEFAULT false
-#define PARM_ATIME_NOW "atime now files"
-#define PARM_ATIME_SLOP "atime now slop"
-#define PARM_CTIME_NOW "ctime now files"
-#define PARM_CTIME_SLOP "ctime now slop"
-#define PARM_MTIME_NOW "mtime now files"
-#define PARM_MTIME_SLOP "mtime now slop"
-#define PARM_MTIME_STATIC "mtime static files"
-#define PARM_ATIME_STATIC "atime static files"
#define IS_CTIME_NOW_PATH(conn,cfg,path) ((conn) && is_in_path((path),\
(cfg)->ctime_now_list,(conn)->case_sensitive))
@@ -81,7 +83,6 @@ enum onefs_acl_wire_format
#define ONEFS_VFS_CONFIG_FAKETIMESTAMPS 0x00000001
-
struct onefs_vfs_config
{
int32 init_flags;
@@ -113,6 +114,25 @@ struct onefs_vfs_config
/*
* vfs interface handlers
*/
+SMB_STRUCT_DIR *onefs_opendir(struct vfs_handle_struct *handle,
+ const char *fname, const char *mask,
+ uint32 attributes);
+
+SMB_STRUCT_DIRENT *onefs_readdir(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp, SMB_STRUCT_STAT *sbuf);
+
+void onefs_seekdir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
+ long offset);
+
+long onefs_telldir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
+
+void onefs_rewinddir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
+
+int onefs_closedir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dir);
+
+void onefs_init_search_op(struct vfs_handle_struct *handle,
+ SMB_STRUCT_DIR *dirp);
+
NTSTATUS onefs_create_file(vfs_handle_struct *handle,
struct smb_request *req,
uint16_t root_dir_fid,