diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/ntlmssp.h | 1 | ||||
-rw-r--r-- | source3/include/smb.h | 2 | ||||
-rw-r--r-- | source3/include/vfs.h | 33 | ||||
-rw-r--r-- | source3/include/vfs_macros.h | 27 |
4 files changed, 60 insertions, 3 deletions
diff --git a/source3/include/ntlmssp.h b/source3/include/ntlmssp.h index 24ac796761..8ab6265673 100644 --- a/source3/include/ntlmssp.h +++ b/source3/include/ntlmssp.h @@ -123,6 +123,7 @@ typedef struct ntlmssp_state * from the DATA_BLOB chal on this structure. * * @param ntlmssp_state This structure + * @param challenge 8 bytes of data, agreed by the client and server to be the effective challenge for NTLM2 authentication * @param challange 8 bytes of data, agreed by the client and server to be the effective challenge for NTLM2 authentication * */ diff --git a/source3/include/smb.h b/source3/include/smb.h index 658b52a2ff..50bd233da7 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -442,6 +442,7 @@ typedef struct files_struct { BOOL is_directory; BOOL is_stat; BOOL directory_delete_on_close; + BOOL aio_write_behind; char *fsp_name; FAKE_FILE_HANDLE *fake_file_handle; } files_struct; @@ -541,6 +542,7 @@ typedef struct connection_struct name_compare_entry *hide_list; /* Per-share list of files to return as hidden. */ name_compare_entry *veto_list; /* Per-share list of files to veto (never show). */ name_compare_entry *veto_oplock_list; /* Per-share list of files to refuse oplocks on. */ + name_compare_entry *aio_write_behind_list; /* Per-share list of files to use aio write behind on. */ } connection_struct; diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 4a06fe853a..c1bab368c9 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -1,7 +1,7 @@ /* Unix SMB/CIFS implementation. VFS structures and parameters - Copyright (C) Jeremy Allison 1999-2004 + Copyright (C) Jeremy Allison 1999-2005 Copyright (C) Tim Potter 1999 Copyright (C) Alexander Bokovoy 2002 Copyright (C) Stefan (metze) Metzmacher 2003 @@ -56,11 +56,12 @@ /* Changed to version 9 to include the get_shadow_data call. --metze */ /* Changed to version 10 to include pread/pwrite calls. */ /* Changed to version 11 to include seekdir/telldir/rewinddir calls. JRA */ -/* Changed to version 12 to add mask and attributes to opendir(). JRA */ +/* Changed to version 12 to add mask and attributes to opendir(). JRA + Also include aio calls. JRA. */ #define SMB_VFS_INTERFACE_VERSION 12 -/* to bug old modules witch are trying to compile with the old functions */ +/* to bug old modules which are trying to compile with the old functions */ #define vfs_init __ERROR_please_port_this_module_to_SMB_VFS_INTERFACE_VERSION_8_donot_use_vfs_init_anymore(void) { __ERROR_please_port_this_module_to_SMB_VFS_INTERFACE_VERSION_8_donot_use_vfs_init_anymore }; #define lp_parm_string __ERROR_please_port_lp_parm_string_to_lp_parm_const_string_or_lp_parm_talloc_string { \ __ERROR_please_port_lp_parm_string_to_lp_parm_const_string_or_lp_parm_talloc_string }; @@ -191,6 +192,15 @@ typedef enum _vfs_op_type { SMB_VFS_OP_LSETXATTR, SMB_VFS_OP_FSETXATTR, + /* aio operations */ + SMB_VFS_OP_AIO_READ, + SMB_VFS_OP_AIO_WRITE, + SMB_VFS_OP_AIO_RETURN, + SMB_VFS_OP_AIO_CANCEL, + SMB_VFS_OP_AIO_ERROR, + SMB_VFS_OP_AIO_FSYNC, + SMB_VFS_OP_AIO_SUSPEND, + /* This should always be last enum value */ SMB_VFS_OP_LAST @@ -302,6 +312,15 @@ struct vfs_ops { int (*lsetxattr)(struct vfs_handle_struct *handle, struct connection_struct *conn,const char *path, const char *name, const void *value, size_t size, int flags); int (*fsetxattr)(struct vfs_handle_struct *handle, struct files_struct *fsp,int filedes, const char *name, const void *value, size_t size, int flags); + /* aio operations */ + int (*aio_read)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb); + int (*aio_write)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb); + ssize_t (*aio_return)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb); + int (*aio_cancel)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_STRUCT_AIOCB *aiocb); + int (*aio_error)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb); + int (*aio_fsync)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb); + int (*aio_suspend)(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *timeout); + } ops; struct vfs_handles_pointers { @@ -405,6 +424,14 @@ struct vfs_ops { struct vfs_handle_struct *lsetxattr; struct vfs_handle_struct *fsetxattr; + /* aio operations */ + struct vfs_handle_struct *aio_read; + struct vfs_handle_struct *aio_write; + struct vfs_handle_struct *aio_return; + struct vfs_handle_struct *aio_cancel; + struct vfs_handle_struct *aio_error; + struct vfs_handle_struct *aio_fsync; + struct vfs_handle_struct *aio_suspend; } handles; }; diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index dbe7c04d74..40ecd75fc9 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -122,6 +122,15 @@ #define SMB_VFS_LSETXATTR(conn,path,name,value,size,flags) ((conn)->vfs.ops.lsetxattr((conn)->vfs.handles.lsetxattr,(conn),(path),(name),(value),(size),(flags))) #define SMB_VFS_FSETXATTR(fsp,fd,name,value,size,flags) ((fsp)->conn->vfs.ops.fsetxattr((fsp)->conn->vfs.handles.fsetxattr,(fsp),(fd),(name),(value),(size),(flags))) +/* AIO operations. */ +#define SMB_VFS_AIO_READ(fsp,aiocb) ((fsp)->conn->vfs.ops.aio_read((fsp)->conn->vfs.handles.aio_read,(fsp),(aiocb))) +#define SMB_VFS_AIO_WRITE(fsp,aiocb) ((fsp)->conn->vfs.ops.aio_write((fsp)->conn->vfs.handles.aio_write,(fsp),(aiocb))) +#define SMB_VFS_AIO_RETURN(fsp,aiocb) ((fsp)->conn->vfs.ops.aio_return((fsp)->conn->vfs.handles.aio_return,(fsp),(aiocb))) +#define SMB_VFS_AIO_CANCEL(fsp,fd,aiocb) ((fsp)->conn->vfs.ops.aio_cancel((fsp)->conn->vfs.handles.aio_cancel,(fsp),(fd),(aiocb))) +#define SMB_VFS_AIO_ERROR(fsp,aiocb) ((fsp)->conn->vfs.ops.aio_error((fsp)->conn->vfs.handles.aio_error,(fsp),(aiocb))) +#define SMB_VFS_AIO_FSYNC(fsp,op,aiocb) ((fsp)->conn->vfs.ops.aio_fsync((fsp)->conn->vfs.handles.aio_fsync,(fsp),(op),(aiocb))) +#define SMB_VFS_AIO_SUSPEND(fsp,aiocb,n,ts) ((fsp)->conn->vfs.ops.aio_suspend((fsp)->conn->vfs.handles.aio_suspend,(fsp),(aiocb),(n),(ts))) + /******************************************************************* Don't access conn->vfs_opaque.ops directly!!! Use this macros! @@ -223,6 +232,15 @@ #define SMB_VFS_OPAQUE_LSETXATTR(conn,path,name,value,size,flags) ((conn)->vfs_opaque.ops.lsetxattr((conn)->vfs_opaque.handles.lsetxattr,(conn),(path),(name),(value),(size),(flags))) #define SMB_VFS_OPAQUE_FSETXATTR(fsp,fd,name,value,size,flags) ((fsp)->conn->vfs_opaque.ops.fsetxattr((fsp)->conn->vfs_opaque.handles.fsetxattr,(fsp),(fd),(name),(value),(size),(flags))) +/* AIO operations. */ +#define SMB_VFS_OPAQUE_AIO_READ(fsp,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_read((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(aiocb))) +#define SMB_VFS_OPAQUE_AIO_WRITE(fsp,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_write((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(aiocb))) +#define SMB_VFS_OPAQUE_AIO_RETURN(fsp,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_return((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(aiocb))) +#define SMB_VFS_OPAQUE_AIO_CANCEL(fsp,fd,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_cancel((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(fd),(aiocb))) +#define SMB_VFS_OPAQUE_AIO_ERROR(fsp,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_error((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(aiocb))) +#define SMB_VFS_OPAQUE_AIO_FSYNC(fsp,op,aiocb) ((fsp)->conn->vfs_opaque.ops.aio_fsync((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(op),(aiocb))) +#define SMB_VFS_OPAQUE_AIO_SUSPEND(fsp,aiocb,n,ts) ((fsp)->conn->vfs_opaque.ops.aio_suspend((fsp)->conn->vfs_opaque.handles.aio_suspend,(fsp),(aiocb),(n),(ts))) + /******************************************************************* Don't access handle->vfs_next.ops.* directly!!! Use this macros! @@ -325,4 +343,13 @@ #define SMB_VFS_NEXT_LSETXATTR(handle,conn,path,name,value,size,flags) ((handle)->vfs_next.ops.lsetxattr((handle)->vfs_next.handles.lsetxattr,(conn),(path),(name),(value),(size),(flags))) #define SMB_VFS_NEXT_FSETXATTR(handle,fsp,fd,name,value,size,flags) ((handle)->vfs_next.ops.fsetxattr((handle)->vfs_next.handles.fsetxattr,(fsp),(fd),(name),(value),(size),(flags))) +/* AIO operations. */ +#define SMB_VFS_NEXT_AIO_READ(handle,fsp,aiocb) ((handle)->vfs_next.ops.aio_read((handle)->vfs_next.handles.aio_read,(fsp),(aiocb))) +#define SMB_VFS_NEXT_AIO_WRITE(handle,fsp,aiocb) ((handle)->vfs_next.ops.aio_write((handle)->vfs_next.handles.aio_read,(fsp),(aiocb))) +#define SMB_VFS_NEXT_AIO_RETURN(handle,fsp,aiocb) ((handle)->vfs_next.ops.aio_return((handle)->vfs_next.handles.aio_read,(fsp),(aiocb))) +#define SMB_VFS_NEXT_AIO_CANCEL(handle,fsp,fd,aiocb) ((handle)->vfs_next.ops.aio_cancel((handle)->vfs_next.handles.aio_read,(fsp),(fd),(aiocb))) +#define SMB_VFS_NEXT_AIO_ERROR(handle,fsp,aiocb) ((handle)->vfs_next.ops.aio_error((handle)->vfs_next.handles.aio_read,(fsp),(aiocb))) +#define SMB_VFS_NEXT_AIO_FSYNC(handle,fsp,op,aiocb) ((handle)->vfs_next.ops.aio_fsync((handle)->vfs_next.handles.aio_read,(fsp),(op),(aiocb))) +#define SMB_VFS_NEXT_AIO_SUSPEND(handle,fsp,aiocb,n,ts) ((handle)->vfs_next.ops.aio_suspend((handle)->vfs_next.handles.aio_suspend,(fsp),(aiocb),(n),(ts))) + #endif /* _VFS_MACROS_H */ |