summaryrefslogtreecommitdiff
path: root/source3/include/vfs.h
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2008-01-16 12:17:03 +0300
committerAlexander Bokovoy <ab@samba.org>2008-01-16 12:17:03 +0300
commitd86fc3ec8c99aaa5ffaa14a97525154507c39df7 (patch)
tree7fb95cd9a112e345fc00a1f156ba01641863ce78 /source3/include/vfs.h
parent68694369fc96354452979b07425f3f48c4f73bbe (diff)
downloadsamba-d86fc3ec8c99aaa5ffaa14a97525154507c39df7.tar.gz
samba-d86fc3ec8c99aaa5ffaa14a97525154507c39df7.tar.bz2
samba-d86fc3ec8c99aaa5ffaa14a97525154507c39df7.zip
Add support for offline files support, remote storage, and Async I/O force operations to VFS
Offline files support and remote storage are for allowing communication with backup and archiving tools that mark files moved to a tape library as offline. We translate this info into corresponding CIFS offline file attribute and mark an exported volume as remote storage. Async I/O force is to allow selective redirection of I/O operations to asynchronous processing in case it is viable at VFS module discretion. It is needed for proper handling of offline files as performing regular I/O on offline file will block smbd. Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 875208724e39564fe81385dfe36e6c963e79e101)
Diffstat (limited to 'source3/include/vfs.h')
-rw-r--r--source3/include/vfs.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 0be3886227..be3cd91520 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -70,6 +70,7 @@
* timestamp resolition. JRA. */
/* Changed to version21 to add chflags operation -- jpeach */
/* Changed to version22 to add lchown operation -- jra */
+/* Additional change: add operations for offline files and remote storage volume abstraction -- ab*/
/* Leave at 22 - not yet released. But change set_nt_acl to return an NTSTATUS. jra. */
/* Leave at 22 - not yet released. Add file_id_create operation. --metze */
/* Leave at 22 - not yet released. Change all BOOL parameters (int) to bool. jra. */
@@ -257,6 +258,12 @@ typedef enum _vfs_op_type {
SMB_VFS_OP_AIO_ERROR,
SMB_VFS_OP_AIO_FSYNC,
SMB_VFS_OP_AIO_SUSPEND,
+ SMB_VFS_OP_AIO_FORCE,
+
+ /* offline operations */
+ SMB_VFS_OP_IS_OFFLINE,
+ SMB_VFS_OP_SET_OFFLINE,
+ SMB_VFS_OP_IS_REMOTESTORAGE,
/* This should always be last enum value */
@@ -405,6 +412,12 @@ struct vfs_ops {
int (*aio_error_fn)(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);
+ bool (*aio_force)(struct vfs_handle_struct *handle, struct files_struct *fsp);
+
+ /* offline operations */
+ int (*is_offline)(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf, bool *offline);
+ int (*set_offline)(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *path);
+ bool (*is_remotestorage)(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *path);
} ops;
@@ -526,6 +539,12 @@ struct vfs_ops {
struct vfs_handle_struct *aio_error;
struct vfs_handle_struct *aio_fsync;
struct vfs_handle_struct *aio_suspend;
+ struct vfs_handle_struct *aio_force;
+
+ /* offline operations */
+ struct vfs_handle_struct *is_offline;
+ struct vfs_handle_struct *set_offline;
+ struct vfs_handle_struct *is_remotestorage;
} handles;
};