/* Bump to version 30 - Samba 4.0.0 will ship with interface version 30 */
/* Leave at 30 - not yet released. Added conn->cwd to save vfs_GetWd() calls. */
/* Leave at 30 - not yet released. add SMB_VFS_COPY_CHUNK() */
+/* Leave at 30 - not yet released. add snapshot create/delete calls */
#define SMB_VFS_INTERFACE_VERSION 30
/*
NTSTATUS (*copy_chunk_recv_fn)(struct vfs_handle_struct *handle,
struct tevent_req *req,
off_t *copied);
+ NTSTATUS (*snap_check_path_fn)(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ const char *service_path,
+ char **base_volume);
+ struct tevent_req *(*snap_create_send_fn)(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const char *base_volume,
+ time_t *tstamp);
+ NTSTATUS (*snap_create_recv_fn)(struct vfs_handle_struct *handle,
+ struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ char **base_path, char **snap_path);
+ struct tevent_req *(*snap_delete_send_fn)(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ char *snap_path);
+ NTSTATUS (*snap_delete_recv_fn)(struct vfs_handle_struct *handle,
+ struct tevent_req *req);
NTSTATUS (*streaminfo_fn)(struct vfs_handle_struct *handle,
struct files_struct *fsp,
NTSTATUS smb_vfs_call_copy_chunk_recv(struct vfs_handle_struct *handle,
struct tevent_req *req,
off_t *copied);
+NTSTATUS smb_vfs_call_snap_check_path(vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ const char *service_path,
+ char **base_volume);
+struct tevent_req *smb_vfs_call_snap_create_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const char *base_volume,
+ time_t *tstamp);
+NTSTATUS smb_vfs_call_snap_create_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ char **base_path, char **snap_path);
+struct tevent_req *smb_vfs_call_snap_delete_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ char *snap_path);
+NTSTATUS smb_vfs_call_snap_delete_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req);
NTSTATUS smb_vfs_call_fget_nt_acl(struct vfs_handle_struct *handle,
struct files_struct *fsp,
uint32 security_info,
#define SMB_VFS_NEXT_COPY_CHUNK_RECV(handle, req, copied) \
smb_vfs_call_copy_chunk_recv((handle)->next, (req), (copied))
+#define SMB_VFS_SNAP_CHECK_PATH(conn, mem_ctx, service_path, base_volume) \
+ smb_vfs_call_snap_check_path((conn)->vfs_handles, (mem_ctx), (service_path), (base_volume))
+#define SMB_VFS_SNAP_CREATE_SEND(conn, mem_ctx, ev, base_volume, tstamp) \
+ smb_vfs_call_snap_create_send((conn)->vfs_handles, (mem_ctx), (ev), (base_volume), (tstamp))
+#define SMB_VFS_SNAP_CREATE_RECV(conn, req, mem_ctx, base_path, snap_path) \
+ smb_vfs_call_snap_create_recv((conn)->vfs_handles, (req), (mem_ctx), (base_path), (snap_path))
+#define SMB_VFS_SNAP_DELETE_SEND(conn, mem_ctx, ev, snap_path) \
+ smb_vfs_call_snap_delete_send((conn)->vfs_handles, (mem_ctx), (ev), (snap_path))
+#define SMB_VFS_SNAP_DELETE_RECV(conn, req) \
+ smb_vfs_call_snap_delete_recv((conn)->vfs_handles, (req))
+
#define SMB_VFS_FGET_NT_ACL(fsp, security_info, ppdesc) \
smb_vfs_call_fget_nt_acl((fsp)->conn->vfs_handles, (fsp), (security_info), (ppdesc))
#define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, ppdesc) \
return handle->fns->copy_chunk_recv_fn(handle, req, copied);
}
+NTSTATUS smb_vfs_call_snap_check_path(vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ const char *service_path,
+ char **base_volume)
+{
+ VFS_FIND(snap_check_path);
+ return handle->fns->snap_check_path_fn(handle, mem_ctx, service_path,
+ base_volume);
+}
+
+struct tevent_req *smb_vfs_call_snap_create_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const char *base_volume,
+ time_t *tstamp)
+{
+ VFS_FIND(snap_create_send);
+ return handle->fns->snap_create_send_fn(handle, mem_ctx, ev,
+ base_volume, tstamp);
+}
+
+NTSTATUS smb_vfs_call_snap_create_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ char **base_path, char **snap_path)
+{
+ VFS_FIND(snap_create_recv);
+ return handle->fns->snap_create_recv_fn(handle, req, mem_ctx,
+ base_path, snap_path);
+}
+
+struct tevent_req *smb_vfs_call_snap_delete_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ char *snap_path)
+{
+ VFS_FIND(snap_delete_send);
+ return handle->fns->snap_delete_send_fn(handle, mem_ctx, ev, snap_path);
+}
+
+NTSTATUS smb_vfs_call_snap_delete_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req)
+{
+ VFS_FIND(snap_delete_recv);
+ return handle->fns->snap_delete_recv_fn(handle, req);
+}
+
NTSTATUS smb_vfs_call_fget_nt_acl(struct vfs_handle_struct *handle,
struct files_struct *fsp,
uint32 security_info,