s3/vfs: rename SMB_VFS_STRICT_LOCK to SMB_VFS_STRICT_LOCK_CHECK
[samba.git] / examples / VFS / skel_opaque.c
index 6948d6452e41d1088ee0f1b5cf9fff7437cb865a..614dcffa928c326a5028aea1a48c81d0c0ad1350 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "../source3/include/includes.h"
+#include "lib/util/tevent_ntstatus.h"
 
 /* PLEASE,PLEASE READ THE VFS MODULES CHAPTER OF THE 
    SAMBA DEVELOPERS GUIDE!!!!!!
@@ -43,9 +44,11 @@ static void skel_disconnect(vfs_handle_struct *handle)
        ;
 }
 
-static uint64_t skel_disk_free(vfs_handle_struct *handle, const char *path,
-                              bool small_query, uint64_t *bsize,
-                              uint64_t *dfree, uint64_t *dsize)
+static uint64_t skel_disk_free(vfs_handle_struct *handle,
+                               const struct smb_filename *smb_fname,
+                               uint64_t *bsize,
+                               uint64_t *dfree,
+                               uint64_t *dsize)
 {
        *bsize = 0;
        *dfree = 0;
@@ -53,8 +56,11 @@ static uint64_t skel_disk_free(vfs_handle_struct *handle, const char *path,
        return 0;
 }
 
-static int skel_get_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
-                         unid_t id, SMB_DISK_QUOTA *dq)
+static int skel_get_quota(vfs_handle_struct *handle,
+                               const struct smb_filename *smb_fname,
+                               enum SMB_QUOTA_TYPE qtype,
+                               unid_t id,
+                               SMB_DISK_QUOTA *dq)
 {
        errno = ENOSYS;
        return -1;
@@ -77,7 +83,8 @@ static int skel_get_shadow_copy_data(vfs_handle_struct *handle,
 }
 
 static int skel_statvfs(struct vfs_handle_struct *handle,
-                       const char *path, struct vfs_statvfs_struct *statbuf)
+                               const struct smb_filename *smb_fname,
+                               struct vfs_statvfs_struct *statbuf)
 {
        errno = ENOSYS;
        return -1;
@@ -95,14 +102,43 @@ static NTSTATUS skel_get_dfs_referrals(struct vfs_handle_struct *handle,
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname,
-                        const char *mask, uint32 attr)
+static DIR *skel_opendir(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       const char *mask,
+                       uint32_t attr)
 {
        return NULL;
 }
 
+static NTSTATUS skel_snap_check_path(struct vfs_handle_struct *handle,
+                                    TALLOC_CTX *mem_ctx,
+                                    const char *service_path,
+                                    char **base_volume)
+{
+       return NT_STATUS_NOT_SUPPORTED;
+}
+
+static NTSTATUS skel_snap_create(struct vfs_handle_struct *handle,
+                                TALLOC_CTX *mem_ctx,
+                                const char *base_volume,
+                                time_t *tstamp,
+                                bool rw,
+                                char **base_path,
+                                char **snap_path)
+{
+       return NT_STATUS_NOT_SUPPORTED;
+}
+
+static NTSTATUS skel_snap_delete(struct vfs_handle_struct *handle,
+                                TALLOC_CTX *mem_ctx,
+                                char *base_path,
+                                char *snap_path)
+{
+       return NT_STATUS_NOT_SUPPORTED;
+}
+
 static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
-                          const char *mask, uint32 attr)
+                          const char *mask, uint32_t attr)
 {
        return NULL;
 }
@@ -128,13 +164,16 @@ static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
        ;
 }
 
-static int skel_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode)
+static int skel_mkdir(vfs_handle_struct *handle,
+               const struct smb_filename *smb_fname,
+               mode_t mode)
 {
        errno = ENOSYS;
        return -1;
 }
 
-static int skel_rmdir(vfs_handle_struct *handle, const char *path)
+static int skel_rmdir(vfs_handle_struct *handle,
+               const struct smb_filename *smb_fname)
 {
        errno = ENOSYS;
        return -1;
@@ -168,11 +207,14 @@ static NTSTATUS skel_create_file(struct vfs_handle_struct *handle,
                                 uint32_t create_options,
                                 uint32_t file_attributes,
                                 uint32_t oplock_request,
+                                struct smb2_lease *lease,
                                 uint64_t allocation_size,
                                 uint32_t private_flags,
                                 struct security_descriptor *sd,
                                 struct ea_list *ea_list,
-                                files_struct **result, int *pinfo)
+                                files_struct **result, int *pinfo,
+                                const struct smb2_create_blobs *in_context_blobs,
+                                struct smb2_create_blobs *out_context_blobs)
 {
        return NT_STATUS_NOT_IMPLEMENTED;
 }
@@ -206,9 +248,10 @@ static struct tevent_req *skel_pread_send(struct vfs_handle_struct *handle,
        return NULL;
 }
 
-static ssize_t skel_pread_recv(struct tevent_req *req, int *err)
+static ssize_t skel_pread_recv(struct tevent_req *req,
+                              struct vfs_aio_state *vfs_aio_state)
 {
-       *err = ENOSYS;
+       vfs_aio_state->error = ENOSYS;
        return -1;
 }
 
@@ -236,9 +279,10 @@ static struct tevent_req *skel_pwrite_send(struct vfs_handle_struct *handle,
        return NULL;
 }
 
-static ssize_t skel_pwrite_recv(struct tevent_req *req, int *err)
+static ssize_t skel_pwrite_recv(struct tevent_req *req,
+                               struct vfs_aio_state *vfs_aio_state)
 {
-       *err = ENOSYS;
+       vfs_aio_state->error = ENOSYS;
        return -1;
 }
 
@@ -286,9 +330,10 @@ static struct tevent_req *skel_fsync_send(struct vfs_handle_struct *handle,
        return NULL;
 }
 
-static int skel_fsync_recv(struct tevent_req *req, int *err)
+static int skel_fsync_recv(struct tevent_req *req,
+                          struct vfs_aio_state *vfs_aio_state)
 {
-       *err = ENOSYS;
+       vfs_aio_state->error = ENOSYS;
        return -1;
 }
 
@@ -327,7 +372,9 @@ static int skel_unlink(vfs_handle_struct *handle,
        return -1;
 }
 
-static int skel_chmod(vfs_handle_struct *handle, const char *path, mode_t mode)
+static int skel_chmod(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       mode_t mode)
 {
        errno = ENOSYS;
        return -1;
@@ -340,8 +387,10 @@ static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp,
        return -1;
 }
 
-static int skel_chown(vfs_handle_struct *handle, const char *path,
-                     uid_t uid, gid_t gid)
+static int skel_chown(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       uid_t uid,
+                       gid_t gid)
 {
        errno = ENOSYS;
        return -1;
@@ -354,20 +403,24 @@ static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp,
        return -1;
 }
 
-static int skel_lchown(vfs_handle_struct *handle, const char *path,
-                      uid_t uid, gid_t gid)
+static int skel_lchown(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       uid_t uid,
+                       gid_t gid)
 {
        errno = ENOSYS;
        return -1;
 }
 
-static int skel_chdir(vfs_handle_struct *handle, const char *path)
+static int skel_chdir(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname)
 {
        errno = ENOSYS;
        return -1;
 }
 
-static char *skel_getwd(vfs_handle_struct *handle)
+static struct smb_filename *skel_getwd(vfs_handle_struct *handle,
+                               TALLOC_CTX *ctx)
 {
        errno = ENOSYS;
        return NULL;
@@ -389,7 +442,7 @@ static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
 }
 
 static int skel_fallocate(vfs_handle_struct *handle, files_struct *fsp,
-                         enum vfs_fallocate_mode mode, off_t offset, off_t len)
+                         uint32_t mode, off_t offset, off_t len)
 {
        errno = ENOSYS;
        return -1;
@@ -404,7 +457,7 @@ static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op,
 
 static int skel_kernel_flock(struct vfs_handle_struct *handle,
                             struct files_struct *fsp,
-                            uint32 share_mode, uint32 access_mask)
+                            uint32_t share_mode, uint32_t access_mask)
 {
        errno = ENOSYS;
        return -1;
@@ -425,54 +478,50 @@ static bool skel_getlock(vfs_handle_struct *handle, files_struct *fsp,
        return false;
 }
 
-static int skel_symlink(vfs_handle_struct *handle, const char *oldpath,
-                       const char *newpath)
+static int skel_symlink(vfs_handle_struct *handle,
+                       const char *link_contents,
+                       const struct smb_filename *new_smb_fname)
 {
        errno = ENOSYS;
        return -1;
 }
 
-static int skel_vfs_readlink(vfs_handle_struct *handle, const char *path,
-                            char *buf, size_t bufsiz)
+static int skel_vfs_readlink(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       char *buf,
+                       size_t bufsiz)
 {
        errno = ENOSYS;
        return -1;
 }
 
-static int skel_link(vfs_handle_struct *handle, const char *oldpath,
-                    const char *newpath)
+static int skel_link(vfs_handle_struct *handle,
+                       const struct smb_filename *old_smb_fname,
+                       const struct smb_filename *new_smb_fname)
 {
        errno = ENOSYS;
        return -1;
 }
 
-static int skel_mknod(vfs_handle_struct *handle, const char *path, mode_t mode,
-                     SMB_DEV_T dev)
+static int skel_mknod(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       mode_t mode,
+                       SMB_DEV_T dev)
 {
        errno = ENOSYS;
        return -1;
 }
 
-static char *skel_realpath(vfs_handle_struct *handle, const char *path)
+static struct smb_filename *skel_realpath(vfs_handle_struct *handle,
+                       TALLOC_CTX *ctx,
+                       const struct smb_filename *smb_fname)
 {
        errno = ENOSYS;
        return NULL;
 }
 
-static NTSTATUS skel_notify_watch(struct vfs_handle_struct *handle,
-                                 struct sys_notify_context *ctx,
-                                 const char *path,
-                                 uint32_t *filter,
-                                 uint32_t *subdir_filter,
-                                 void (*callback) (struct sys_notify_context *
-                                                   ctx, void *private_data,
-                                                   struct notify_event *ev),
-                                 void *private_data, void *handle_p)
-{
-       return NT_STATUS_NOT_IMPLEMENTED;
-}
-
-static int skel_chflags(vfs_handle_struct *handle, const char *path,
+static int skel_chflags(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
                        uint flags)
 {
        errno = ENOSYS;
@@ -488,9 +537,108 @@ static struct file_id skel_file_id_create(vfs_handle_struct *handle,
        return id;
 }
 
+struct skel_offload_read_state {
+       bool dummy;
+};
+
+static struct tevent_req *skel_offload_read_send(
+       TALLOC_CTX *mem_ctx,
+       struct tevent_context *ev,
+       struct vfs_handle_struct *handle,
+       struct files_struct *fsp,
+       uint32_t fsctl,
+       uint32_t ttl,
+       off_t offset,
+       size_t to_copy)
+{
+       struct tevent_req *req = NULL;
+       struct skel_offload_read_state *state = NULL;
+
+       req = tevent_req_create(mem_ctx, &state, struct skel_offload_read_state);
+       if (req == NULL) {
+               return NULL;
+       }
+
+       tevent_req_nterror(req, NT_STATUS_NOT_IMPLEMENTED);
+       return tevent_req_post(req, ev);
+}
+
+static NTSTATUS skel_offload_read_recv(struct tevent_req *req,
+                                      struct vfs_handle_struct *handle,
+                                      TALLOC_CTX *mem_ctx,
+                                      DATA_BLOB *_token_blob)
+{
+       NTSTATUS status;
+
+       if (tevent_req_is_nterror(req, &status)) {
+               tevent_req_received(req);
+               return status;
+       }
+       tevent_req_received(req);
+
+       return NT_STATUS_OK;
+}
+
+struct skel_cc_state {
+       uint64_t unused;
+};
+static struct tevent_req *skel_offload_write_send(struct vfs_handle_struct *handle,
+                                              TALLOC_CTX *mem_ctx,
+                                              struct tevent_context *ev,
+                                              uint32_t fsctl,
+                                              DATA_BLOB *token,
+                                              off_t transfer_offset,
+                                              struct files_struct *dest_fsp,
+                                              off_t dest_off,
+                                              off_t num)
+{
+       struct tevent_req *req;
+       struct skel_cc_state *cc_state;
+
+       req = tevent_req_create(mem_ctx, &cc_state, struct skel_cc_state);
+       if (req == NULL) {
+               return NULL;
+       }
+
+       tevent_req_nterror(req, NT_STATUS_NOT_IMPLEMENTED);
+       return tevent_req_post(req, ev);
+}
+
+static NTSTATUS skel_offload_write_recv(struct vfs_handle_struct *handle,
+                                    struct tevent_req *req,
+                                    off_t *copied)
+{
+       NTSTATUS status;
+
+       if (tevent_req_is_nterror(req, &status)) {
+               tevent_req_received(req);
+               return status;
+       }
+       tevent_req_received(req);
+
+       return NT_STATUS_OK;
+}
+
+static NTSTATUS skel_get_compression(struct vfs_handle_struct *handle,
+                                    TALLOC_CTX *mem_ctx,
+                                    struct files_struct *fsp,
+                                    struct smb_filename *smb_fname,
+                                    uint16_t *_compression_fmt)
+{
+       return NT_STATUS_INVALID_DEVICE_REQUEST;
+}
+
+static NTSTATUS skel_set_compression(struct vfs_handle_struct *handle,
+                                    TALLOC_CTX *mem_ctx,
+                                    struct files_struct *fsp,
+                                    uint16_t compression_fmt)
+{
+       return NT_STATUS_INVALID_DEVICE_REQUEST;
+}
+
 static NTSTATUS skel_streaminfo(struct vfs_handle_struct *handle,
                                struct files_struct *fsp,
-                               const char *fname,
+                               const struct smb_filename *smb_fname,
                                TALLOC_CTX *mem_ctx,
                                unsigned int *num_streams,
                                struct stream_struct **streams)
@@ -508,7 +656,7 @@ static int skel_get_real_filename(struct vfs_handle_struct *handle,
 }
 
 static const char *skel_connectpath(struct vfs_handle_struct *handle,
-                                   const char *filename)
+                               const struct smb_filename *smb_fname)
 {
        errno = ENOSYS;
        return NULL;
@@ -517,8 +665,7 @@ static const char *skel_connectpath(struct vfs_handle_struct *handle,
 static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
                                      struct byte_range_lock *br_lck,
                                      struct lock_struct *plock,
-                                     bool blocking_lock,
-                                     struct blocking_lock_record *blr)
+                                     bool blocking_lock)
 {
        return NT_STATUS_NOT_IMPLEMENTED;
 }
@@ -534,28 +681,20 @@ static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
 
 static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
                                    struct byte_range_lock *br_lck,
-                                   struct lock_struct *plock,
-                                   struct blocking_lock_record *blr)
+                                   struct lock_struct *plock)
 {
        errno = ENOSYS;
        return false;
 }
 
-static bool skel_strict_lock(struct vfs_handle_struct *handle,
-                            struct files_struct *fsp,
-                            struct lock_struct *plock)
+static bool skel_strict_lock_check(struct vfs_handle_struct *handle,
+                                  struct files_struct *fsp,
+                                  struct lock_struct *plock)
 {
        errno = ENOSYS;
        return false;
 }
 
-static void skel_strict_unlock(struct vfs_handle_struct *handle,
-                              struct files_struct *fsp,
-                              struct lock_struct *plock)
-{
-       ;
-}
-
 static NTSTATUS skel_translate_name(struct vfs_handle_struct *handle,
                                    const char *mapped_name,
                                    enum vfs_translate_direction direction,
@@ -577,8 +716,44 @@ static NTSTATUS skel_fsctl(struct vfs_handle_struct *handle,
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
+static NTSTATUS skel_readdir_attr(struct vfs_handle_struct *handle,
+                                 const struct smb_filename *fname,
+                                 TALLOC_CTX *mem_ctx,
+                                 struct readdir_attr_data **pattr_data)
+{
+       return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS skel_get_dos_attributes(struct vfs_handle_struct *handle,
+                               struct smb_filename *smb_fname,
+                               uint32_t *dosmode)
+{
+       return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS skel_fget_dos_attributes(struct vfs_handle_struct *handle,
+                               struct files_struct *fsp,
+                               uint32_t *dosmode)
+{
+       return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS skel_set_dos_attributes(struct vfs_handle_struct *handle,
+                               const struct smb_filename *smb_fname,
+                               uint32_t dosmode)
+{
+       return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS skel_fset_dos_attributes(struct vfs_handle_struct *handle,
+                               struct files_struct *fsp,
+                               uint32_t dosmode)
+{
+       return NT_STATUS_NOT_IMPLEMENTED;
+}
+
 static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
-                                uint32 security_info,
+                                uint32_t security_info,
                                 TALLOC_CTX *mem_ctx,
                                 struct security_descriptor **ppdesc)
 {
@@ -586,7 +761,8 @@ static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
 }
 
 static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
-                               const char *name, uint32 security_info,
+                               const struct smb_filename *smb_fname,
+                               uint32_t security_info,
                                TALLOC_CTX *mem_ctx,
                                struct security_descriptor **ppdesc)
 {
@@ -594,14 +770,15 @@ static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
 }
 
 static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
-                                uint32 security_info_sent,
+                                uint32_t security_info_sent,
                                 const struct security_descriptor *psd)
 {
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-static int skel_chmod_acl(vfs_handle_struct *handle, const char *name,
-                         mode_t mode)
+static int skel_chmod_acl(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       mode_t mode)
 {
        errno = ENOSYS;
        return -1;
@@ -615,7 +792,7 @@ static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
 }
 
 static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,
-                                      const char *path_p,
+                                      const struct smb_filename *smb_fname,
                                       SMB_ACL_TYPE_T type,
                                       TALLOC_CTX *mem_ctx)
 {
@@ -631,8 +808,10 @@ static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
 }
 
 static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,
-                                     const char *path_p, TALLOC_CTX *mem_ctx,
-                                     char **blob_description, DATA_BLOB *blob)
+                               const struct smb_filename *smb_fname,
+                               TALLOC_CTX *mem_ctx,
+                               char **blob_description,
+                               DATA_BLOB *blob)
 {
        errno = ENOSYS;
        return -1;
@@ -646,8 +825,10 @@ static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle,
        return -1;
 }
 
-static int skel_sys_acl_set_file(vfs_handle_struct *handle, const char *name,
-                                SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
+static int skel_sys_acl_set_file(vfs_handle_struct *handle,
+                               const struct smb_filename *smb_fname,
+                               SMB_ACL_TYPE_T acltype,
+                               SMB_ACL_T theacl)
 {
        errno = ENOSYS;
        return -1;
@@ -661,14 +842,17 @@ static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
 }
 
 static int skel_sys_acl_delete_def_file(vfs_handle_struct *handle,
-                                       const char *path)
+                                       const struct smb_filename *smb_fname)
 {
        errno = ENOSYS;
        return -1;
 }
 
-static ssize_t skel_getxattr(vfs_handle_struct *handle, const char *path,
-                            const char *name, void *value, size_t size)
+static ssize_t skel_getxattr(vfs_handle_struct *handle,
+                               const struct smb_filename *smb_fname,
+                               const char *name,
+                               void *value,
+                               size_t size)
 {
        errno = ENOSYS;
        return -1;
@@ -682,8 +866,10 @@ static ssize_t skel_fgetxattr(vfs_handle_struct *handle,
        return -1;
 }
 
-static ssize_t skel_listxattr(vfs_handle_struct *handle, const char *path,
-                             char *list, size_t size)
+static ssize_t skel_listxattr(vfs_handle_struct *handle,
+                               const struct smb_filename *smb_fname,
+                               char *list,
+                               size_t size)
 {
        errno = ENOSYS;
        return -1;
@@ -697,8 +883,9 @@ static ssize_t skel_flistxattr(vfs_handle_struct *handle,
        return -1;
 }
 
-static int skel_removexattr(vfs_handle_struct *handle, const char *path,
-                           const char *name)
+static int skel_removexattr(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       const char *name)
 {
        errno = ENOSYS;
        return -1;
@@ -712,9 +899,12 @@ static int skel_fremovexattr(vfs_handle_struct *handle,
        return SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name);
 }
 
-static int skel_setxattr(vfs_handle_struct *handle, const char *path,
-                        const char *name, const void *value, size_t size,
-                        int flags)
+static int skel_setxattr(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       const char *name,
+                       const void *value,
+                       size_t size,
+                       int flags)
 {
        errno = ENOSYS;
        return -1;
@@ -735,21 +925,6 @@ static bool skel_aio_force(struct vfs_handle_struct *handle,
        return false;
 }
 
-static bool skel_is_offline(struct vfs_handle_struct *handle,
-                           const struct smb_filename *fname,
-                           SMB_STRUCT_STAT *sbuf)
-{
-       errno = ENOSYS;
-       return false;
-}
-
-static int skel_set_offline(struct vfs_handle_struct *handle,
-                           const struct smb_filename *fname)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 /* VFS operations structure */
 
 struct vfs_fn_pointers skel_opaque_fns = {
@@ -764,6 +939,9 @@ struct vfs_fn_pointers skel_opaque_fns = {
        .statvfs_fn = skel_statvfs,
        .fs_capabilities_fn = skel_fs_capabilities,
        .get_dfs_referrals_fn = skel_get_dfs_referrals,
+       .snap_check_path_fn = skel_snap_check_path,
+       .snap_create_fn = skel_snap_create,
+       .snap_delete_fn = skel_snap_delete,
 
        /* Directory operations */
 
@@ -822,9 +1000,14 @@ struct vfs_fn_pointers skel_opaque_fns = {
        .link_fn = skel_link,
        .mknod_fn = skel_mknod,
        .realpath_fn = skel_realpath,
-       .notify_watch_fn = skel_notify_watch,
        .chflags_fn = skel_chflags,
        .file_id_create_fn = skel_file_id_create,
+       .offload_read_send_fn = skel_offload_read_send,
+       .offload_read_recv_fn = skel_offload_read_recv,
+       .offload_write_send_fn = skel_offload_write_send,
+       .offload_write_recv_fn = skel_offload_write_recv,
+       .get_compression_fn = skel_get_compression,
+       .set_compression_fn = skel_set_compression,
 
        .streaminfo_fn = skel_streaminfo,
        .get_real_filename_fn = skel_get_real_filename,
@@ -832,10 +1015,16 @@ struct vfs_fn_pointers skel_opaque_fns = {
        .brl_lock_windows_fn = skel_brl_lock_windows,
        .brl_unlock_windows_fn = skel_brl_unlock_windows,
        .brl_cancel_windows_fn = skel_brl_cancel_windows,
-       .strict_lock_fn = skel_strict_lock,
-       .strict_unlock_fn = skel_strict_unlock,
+       .strict_lock_check_fn = skel_strict_lock_check,
        .translate_name_fn = skel_translate_name,
        .fsctl_fn = skel_fsctl,
+       .readdir_attr_fn = skel_readdir_attr,
+
+       /* DOS attributes. */
+       .get_dos_attributes_fn = skel_get_dos_attributes,
+       .fget_dos_attributes_fn = skel_fget_dos_attributes,
+       .set_dos_attributes_fn = skel_set_dos_attributes,
+       .fset_dos_attributes_fn = skel_fset_dos_attributes,
 
        /* NT ACL operations. */
 
@@ -868,13 +1057,10 @@ struct vfs_fn_pointers skel_opaque_fns = {
 
        /* aio operations */
        .aio_force_fn = skel_aio_force,
-
-       /* offline operations */
-       .is_offline_fn = skel_is_offline,
-       .set_offline_fn = skel_set_offline
 };
 
-NTSTATUS vfs_skel_opaque_init(void)
+static_decl_vfs;
+NTSTATUS vfs_skel_opaque_init(TALLOC_CTX *ctx)
 {
        return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque",
                                &skel_opaque_fns);