SMB_VFS_GET_DOS_ATTRIBUTES vs SMB_VFS_IS_OFFLINE

Ralph Böhme slow at samba.org
Sun Sep 11 14:17:02 UTC 2016


Hi!

Now that we have a full fledged SMB_VFS_{GET|SET}_DOS_ATTRIBUTES() I
was wondering whether it would be doable to merge SMB_VFS_IS_OFFLINE()
into SMB_VFS_GET_DOS_ATTRIBUTES()?

Merging both functions would have the benefit that in VFS modules that
use same backing store bits for both, like gpfs, we would avoid
calling the backing store twice in dos_mode().

I don't see a reason why SMB_VFS_{GET|SET}_DOS_ATTRIBUTES() couldn't
handle FILE_ATTRIBUTE_OFFLINE as well. WIP patch attached, passed a
private autobuild.

Thoughts?

Cheerio!
-slow
-------------- next part --------------
From 2e680e472a688dc76c7d3d3f7c22fa3bbfba55f2 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Sun, 11 Sep 2016 12:39:13 +0200
Subject: [PATCH] WIP: s3/vfs: merge offline stuff into attributes stuff

---
 examples/VFS/skel_opaque.c          | 25 ++--------
 examples/VFS/skel_transparent.c     | 29 ++++--------
 libcli/smb/smb_constants.h          |  3 +-
 source3/include/vfs.h               | 19 ++++----
 source3/include/vfs_macros.h        | 26 ++++-------
 source3/modules/vfs_ceph.c          | 18 --------
 source3/modules/vfs_default.c       | 44 ++++++++++--------
 source3/modules/vfs_full_audit.c    | 37 ++++-----------
 source3/modules/vfs_glusterfs.c     | 20 --------
 source3/modules/vfs_gpfs.c          |  7 ++-
 source3/modules/vfs_media_harmony.c | 77 -------------------------------
 source3/modules/vfs_offline.c       | 21 +++++++--
 source3/modules/vfs_time_audit.c    | 53 ++++-----------------
 source3/modules/vfs_tsmsm.c         | 92 +++++++++++++++++++++++++++++++++----
 source3/modules/vfs_unityed_media.c | 59 ------------------------
 source3/smbd/dosmode.c              | 43 ++---------------
 source3/smbd/proto.h                |  3 +-
 source3/smbd/vfs.c                  | 25 +++-------
 18 files changed, 190 insertions(+), 411 deletions(-)

diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 81ce184..93ba030 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -688,14 +688,16 @@ static NTSTATUS skel_fget_dos_attributes(struct vfs_handle_struct *handle,
 
 static NTSTATUS skel_set_dos_attributes(struct vfs_handle_struct *handle,
 				const struct smb_filename *smb_fname,
-				uint32_t dosmode)
+				uint32_t dosmode,
+				uint32_t old_attributes)
 {
 	return NT_STATUS_NOT_IMPLEMENTED;
 }
 
 static NTSTATUS skel_fset_dos_attributes(struct vfs_handle_struct *handle,
 				struct files_struct *fsp,
-				uint32_t dosmode)
+				uint32_t dosmode,
+				uint32_t old_attributes)
 {
 	return NT_STATUS_NOT_IMPLEMENTED;
 }
@@ -860,21 +862,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 = {
@@ -1006,10 +993,6 @@ 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
 };
 
 static_decl_vfs;
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 418ee24..c75438f 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -821,20 +821,24 @@ static NTSTATUS skel_fget_dos_attributes(struct vfs_handle_struct *handle,
 
 static NTSTATUS skel_set_dos_attributes(struct vfs_handle_struct *handle,
 				const struct smb_filename *smb_fname,
-				uint32_t dosmode)
+				uint32_t dosmode,
+				uint32_t old_attributes)
 {
 	return SMB_VFS_NEXT_SET_DOS_ATTRIBUTES(handle,
 				smb_fname,
-				dosmode);
+				dosmode,
+				old_attributes);
 }
 
 static NTSTATUS skel_fset_dos_attributes(struct vfs_handle_struct *handle,
 				struct files_struct *fsp,
-				uint32_t dosmode)
+				uint32_t dosmode,
+				uint32_t old_attributes)
 {
 	return SMB_VFS_NEXT_FSET_DOS_ATTRIBUTES(handle,
 				fsp,
-				dosmode);
+				dosmode,
+				old_attributes);
 }
 
 static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
@@ -985,19 +989,6 @@ static bool skel_aio_force(struct vfs_handle_struct *handle,
 	return SMB_VFS_NEXT_AIO_FORCE(handle, fsp);
 }
 
-static bool skel_is_offline(struct vfs_handle_struct *handle,
-			    const struct smb_filename *fname,
-			    SMB_STRUCT_STAT *sbuf)
-{
-	return SMB_VFS_NEXT_IS_OFFLINE(handle, fname, sbuf);
-}
-
-static int skel_set_offline(struct vfs_handle_struct *handle,
-			    const struct smb_filename *fname)
-{
-	return SMB_VFS_NEXT_SET_OFFLINE(handle, fname);
-}
-
 /* VFS operations structure */
 
 struct vfs_fn_pointers skel_transparent_fns = {
@@ -1129,10 +1120,6 @@ struct vfs_fn_pointers skel_transparent_fns = {
 
 	/* aio operations */
 	.aio_force_fn = skel_aio_force,
-
-	/* offline operations */
-	.is_offline_fn = skel_is_offline,
-	.set_offline_fn = skel_set_offline
 };
 
 static_decl_vfs;
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index 2fcb590..6fc4230 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -341,7 +341,8 @@ enum csc_policy {
 					FILE_ATTRIBUTE_HIDDEN|\
 					FILE_ATTRIBUTE_SYSTEM|\
 					FILE_ATTRIBUTE_DIRECTORY|\
-					FILE_ATTRIBUTE_ARCHIVE)
+					FILE_ATTRIBUTE_ARCHIVE|\
+					FILE_ATTRIBUTE_OFFLINE)
 
 /* File type flags */
 #define FILE_TYPE_DISK  0
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index dca6cef..384f7c3 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -800,11 +800,13 @@ struct vfs_fn_pointers {
 
 	NTSTATUS (*set_dos_attributes_fn)(struct vfs_handle_struct *handle,
 					  const struct smb_filename *smb_fname,
-					  uint32_t dosmode);
+					  uint32_t dosmode,
+					  uint32_t old_dosmode);
 
 	NTSTATUS (*fset_dos_attributes_fn)(struct vfs_handle_struct *hande,
 					   struct files_struct *fsp,
-					   uint32_t dosmode);
+					   uint32_t dosmode,
+					   uint32_t old_dosmode);
 
 	/* NT ACL operations. */
 
@@ -868,13 +870,6 @@ struct vfs_fn_pointers {
 	/* aio operations */
 	bool (*aio_force_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp);
 
-	/* offline operations */
-	bool (*is_offline_fn)(struct vfs_handle_struct *handle,
-			   const struct smb_filename *fname,
-			   SMB_STRUCT_STAT *sbuf);
-	int (*set_offline_fn)(struct vfs_handle_struct *handle,
-			   const struct smb_filename *fname);
-
 	/* durable handle operations */
 	NTSTATUS (*durable_cookie_fn)(struct vfs_handle_struct *handle,
 				      struct files_struct *fsp,
@@ -1234,10 +1229,12 @@ NTSTATUS smb_vfs_call_fget_dos_attributes(struct vfs_handle_struct *handle,
 					  uint32_t *dosmode);
 NTSTATUS smb_vfs_call_set_dos_attributes(struct vfs_handle_struct *handle,
 					 const struct smb_filename *smb_fname,
-					 uint32_t dosmode);
+					 uint32_t dosmode,
+					 uint32_t old_attributes);
 NTSTATUS smb_vfs_call_fset_dos_attributes(struct vfs_handle_struct *handle,
 					  struct files_struct *fsp,
-					  uint32_t dosmode);
+					  uint32_t dosmode,
+					  uint32_t old_attributes);
 struct tevent_req *smb_vfs_call_copy_chunk_send(struct vfs_handle_struct *handle,
 						TALLOC_CTX *mem_ctx,
 						struct tevent_context *ev,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index c3c9a17..0fe77ba 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -406,14 +406,14 @@
 #define SMB_VFS_NEXT_FGET_DOS_ATTRIBUTES(handle, fsp, attributes) \
 	smb_vfs_call_fget_dos_attributes((handle)->next, (fsp), (attributes))
 
-#define SMB_VFS_SET_DOS_ATTRIBUTES(conn, smb_fname, attributes) \
-	smb_vfs_call_set_dos_attributes((conn)->vfs_handles, (smb_fname), (attributes))
-#define SMB_VFS_NEXT_SET_DOS_ATTRIBUTES(handle, smb_fname, attributes) \
-	smb_vfs_call_set_dos_attributes((handle)->next, (smb_fname), (attributes))
-#define SMB_VFS_FSET_DOS_ATTRIBUTES(conn, fsp, attributes) \
-	smb_vfs_call_fset_dos_attributes((conn)->vfs_handles, (fsp), (attributes))
-#define SMB_VFS_NEXT_FSET_DOS_ATTRIBUTES(handle, fsp, attributes) \
-	smb_vfs_call_fset_dos_attributes((handle)->next, (fsp), (attributes))
+#define SMB_VFS_SET_DOS_ATTRIBUTES(conn, smb_fname, attributes, old_attributes)	\
+	smb_vfs_call_set_dos_attributes((conn)->vfs_handles, (smb_fname), (attributes), (old_attributes))
+#define SMB_VFS_NEXT_SET_DOS_ATTRIBUTES(handle, smb_fname, attributes, old_attributes) \
+	smb_vfs_call_set_dos_attributes((handle)->next, (smb_fname), (attributes), (old_attributes))
+#define SMB_VFS_FSET_DOS_ATTRIBUTES(conn, fsp, attributes, old_attributes) \
+	smb_vfs_call_fset_dos_attributes((conn)->vfs_handles, (fsp), (attributes), (old_attributes))
+#define SMB_VFS_NEXT_FSET_DOS_ATTRIBUTES(handle, fsp, attributes, old_attributes) \
+	smb_vfs_call_fset_dos_attributes((handle)->next, (fsp), (attributes), (old_attributes))
 
 #define SMB_VFS_COPY_CHUNK_SEND(conn, mem_ctx, ev, src_fsp, src_off, dest_fsp, dest_off, num) \
 	smb_vfs_call_copy_chunk_send((conn)->vfs_handles, (mem_ctx), (ev), (src_fsp), (src_off), (dest_fsp), (dest_off), (num))
@@ -560,16 +560,6 @@
 #define SMB_VFS_NEXT_AIO_FORCE(handle,fsp) \
 	smb_vfs_call_aio_force((handle)->next,(fsp))
 
-#define SMB_VFS_IS_OFFLINE(conn,fname,sbuf) \
-	smb_vfs_call_is_offline((conn)->vfs_handles,(fname),(sbuf))
-#define SMB_VFS_NEXT_IS_OFFLINE(handle,fname,sbuf) \
-	smb_vfs_call_is_offline((handle)->next,(fname),(sbuf))
-
-#define SMB_VFS_SET_OFFLINE(conn,fname) \
-	smb_vfs_call_set_offline((conn)->vfs_handles,(fname))
-#define SMB_VFS_NEXT_SET_OFFLINE(handle,fname) \
-	smb_vfs_call_set_offline((handle)->next, (fname))
-
 /* durable handle operations */
 
 #define SMB_VFS_DURABLE_COOKIE(fsp, mem_ctx, cookie) \
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 59e9b9c..8e02683 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -1204,20 +1204,6 @@ static bool cephwrap_aio_force(struct vfs_handle_struct *handle, struct files_st
 	return false;
 }
 
-static bool cephwrap_is_offline(struct vfs_handle_struct *handle,
-				const struct smb_filename *fname,
-				SMB_STRUCT_STAT *sbuf)
-{
-	return false;
-}
-
-static int cephwrap_set_offline(struct vfs_handle_struct *handle,
-				const struct smb_filename *fname)
-{
-	errno = ENOTSUP;
-	return -1;
-}
-
 static struct vfs_fn_pointers ceph_fns = {
 	/* Disk operations */
 
@@ -1300,10 +1286,6 @@ static struct vfs_fn_pointers ceph_fns = {
 
 	/* aio operations */
 	.aio_force_fn = cephwrap_aio_force,
-
-	/* offline operations */
-	.is_offline_fn = cephwrap_is_offline,
-	.set_offline_fn = cephwrap_set_offline
 };
 
 NTSTATUS vfs_ceph_init(void);
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 53199b8..abfa3ac 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1544,10 +1544,21 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle,
 	return NT_STATUS_NOT_SUPPORTED;
 }
 
+static bool vfswrap_is_offline(struct vfs_handle_struct *handle,
+			       const struct smb_filename *fname,
+			       SMB_STRUCT_STAT *sbuf);
+
 static NTSTATUS vfswrap_get_dos_attributes(struct vfs_handle_struct *handle,
 					   struct smb_filename *smb_fname,
 					   uint32_t *dosmode)
 {
+	bool offline;
+
+	offline = vfswrap_is_offline(handle, smb_fname, &smb_fname->st);
+	if (offline) {
+		*dosmode |= FILE_ATTRIBUTE_OFFLINE;
+	}
+
 	return get_ea_dos_attribute(handle->conn, smb_fname, dosmode);
 }
 
@@ -1555,21 +1566,32 @@ static NTSTATUS vfswrap_fget_dos_attributes(struct vfs_handle_struct *handle,
 					    struct files_struct *fsp,
 					    uint32_t *dosmode)
 {
+	bool offline;
+
+	offline = vfswrap_is_offline(handle, fsp->fsp_name, &fsp->fsp_name->st);
+	if (offline) {
+		*dosmode |= FILE_ATTRIBUTE_OFFLINE;
+	}
+
 	return get_ea_dos_attribute(handle->conn, fsp->fsp_name, dosmode);
 }
 
 static NTSTATUS vfswrap_set_dos_attributes(struct vfs_handle_struct *handle,
 					   const struct smb_filename *smb_fname,
-					   uint32_t dosmode)
+					   uint32_t dosmode,
+					   uint32_t old_dosmode)
 {
-	return set_ea_dos_attribute(handle->conn, smb_fname, dosmode);
+	return set_ea_dos_attribute(handle->conn, smb_fname,
+				    dosmode, old_dosmode);
 }
 
 static NTSTATUS vfswrap_fset_dos_attributes(struct vfs_handle_struct *handle,
 					    struct files_struct *fsp,
-					    uint32_t dosmode)
+					    uint32_t dosmode,
+					    uint32_t old_dosmode)
 {
-	return set_ea_dos_attribute(handle->conn, fsp->fsp_name, dosmode);
+	return set_ea_dos_attribute(handle->conn, fsp->fsp_name,
+				    dosmode, old_dosmode);
 }
 
 struct vfs_cc_state {
@@ -2683,16 +2705,6 @@ static bool vfswrap_is_offline(struct vfs_handle_struct *handle,
 	return offline;
 }
 
-static int vfswrap_set_offline(struct vfs_handle_struct *handle,
-			       const struct smb_filename *fname)
-{
-	/* We don't know how to set offline bit by default, needs to be overriden in the vfs modules */
-#if defined(ENOTSUP)
-	errno = ENOTSUP;
-#endif
-	return -1;
-}
-
 static NTSTATUS vfswrap_durable_cookie(struct vfs_handle_struct *handle,
 				       struct files_struct *fsp,
 				       TALLOC_CTX *mem_ctx,
@@ -2852,10 +2864,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
 	/* aio operations */
 	.aio_force_fn = vfswrap_aio_force,
 
-	/* offline operations */
-	.is_offline_fn = vfswrap_is_offline,
-	.set_offline_fn = vfswrap_set_offline,
-
 	/* durable handle operations */
 	.durable_cookie_fn = vfswrap_durable_cookie,
 	.durable_disconnect_fn = vfswrap_durable_disconnect,
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index edff395..720fb6d 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -2006,13 +2006,15 @@ static NTSTATUS smb_full_audit_fget_dos_attributes(
 static NTSTATUS smb_full_audit_set_dos_attributes(
 				struct vfs_handle_struct *handle,
 				const struct smb_filename *smb_fname,
-				uint32_t dosmode)
+				uint32_t dosmode,
+				uint32_t old_dosmode)
 {
 	NTSTATUS status;
 
 	status = SMB_VFS_NEXT_SET_DOS_ATTRIBUTES(handle,
 				smb_fname,
-				dosmode);
+				dosmode,
+				old_dosmode);
 
 	do_log(SMB_VFS_OP_SET_DOS_ATTRIBUTES,
 		NT_STATUS_IS_OK(status),
@@ -2026,13 +2028,15 @@ static NTSTATUS smb_full_audit_set_dos_attributes(
 static NTSTATUS smb_full_audit_fset_dos_attributes(
 				struct vfs_handle_struct *handle,
 				struct files_struct *fsp,
-				uint32_t dosmode)
+				uint32_t dosmode,
+				uint32_t old_dosmode)
 {
 	NTSTATUS status;
 
 	status = SMB_VFS_NEXT_FSET_DOS_ATTRIBUTES(handle,
 				fsp,
-				dosmode);
+				dosmode,
+				old_dosmode);
 
 	do_log(SMB_VFS_OP_FSET_DOS_ATTRIBUTES,
 		NT_STATUS_IS_OK(status),
@@ -2376,29 +2380,6 @@ static bool smb_full_audit_aio_force(struct vfs_handle_struct *handle,
 	return result;
 }
 
-static bool smb_full_audit_is_offline(struct vfs_handle_struct *handle,
-				      const struct smb_filename *fname,
-				      SMB_STRUCT_STAT *sbuf)
-{
-	bool result;
-
-	result = SMB_VFS_NEXT_IS_OFFLINE(handle, fname, sbuf);
-	do_log(SMB_VFS_OP_IS_OFFLINE, result, handle, "%s",
-	       smb_fname_str_do_log(fname));
-	return result;
-}
-
-static int smb_full_audit_set_offline(struct vfs_handle_struct *handle,
-				      const struct smb_filename *fname)
-{
-	int result;
-
-	result = SMB_VFS_NEXT_SET_OFFLINE(handle, fname);
-	do_log(SMB_VFS_OP_SET_OFFLINE, result >= 0, handle, "%s",
-	       smb_fname_str_do_log(fname));
-	return result;
-}
-
 static NTSTATUS smb_full_audit_durable_cookie(struct vfs_handle_struct *handle,
 				struct files_struct *fsp,
 				TALLOC_CTX *mem_ctx,
@@ -2575,8 +2556,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
 	.setxattr_fn = smb_full_audit_setxattr,
 	.fsetxattr_fn = smb_full_audit_fsetxattr,
 	.aio_force_fn = smb_full_audit_aio_force,
-	.is_offline_fn = smb_full_audit_is_offline,
-	.set_offline_fn = smb_full_audit_set_offline,
 	.durable_cookie_fn = smb_full_audit_durable_cookie,
 	.durable_disconnect_fn = smb_full_audit_durable_disconnect,
 	.durable_reconnect_fn = smb_full_audit_durable_reconnect,
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index fbcaf5c..461e4eb 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1248,22 +1248,6 @@ static bool vfs_gluster_aio_force(struct vfs_handle_struct *handle,
 	return false;
 }
 
-/* Offline Operations */
-
-static bool vfs_gluster_is_offline(struct vfs_handle_struct *handle,
-				   const struct smb_filename *fname,
-				   SMB_STRUCT_STAT *sbuf)
-{
-	return false;
-}
-
-static int vfs_gluster_set_offline(struct vfs_handle_struct *handle,
-				   const struct smb_filename *fname)
-{
-	errno = ENOTSUP;
-	return -1;
-}
-
 static struct vfs_fn_pointers glusterfs_fns = {
 
 	/* Disk Operations */
@@ -1383,10 +1367,6 @@ static struct vfs_fn_pointers glusterfs_fns = {
 	/* AIO Operations */
 	.aio_force_fn = vfs_gluster_aio_force,
 
-	/* Offline Operations */
-	.is_offline_fn = vfs_gluster_is_offline,
-	.set_offline_fn = vfs_gluster_set_offline,
-
 	/* Durable handle Operations */
 	.durable_cookie_fn = NULL,
 	.durable_disconnect_fn = NULL,
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 730dda2..28da8e2 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1502,6 +1502,9 @@ static uint32_t vfs_gpfs_winattrs_to_dosmode(unsigned int winattrs)
 	if (winattrs & GPFS_WINATTR_SPARSE_FILE) {
 		dosmode |= FILE_ATTRIBUTE_SPARSE;
 	}
+	if (winattrs & GPFS_WINATTR_OFFLINE) {
+		dosmode |= FILE_ATTRIBUTE_OFFLINE;
+	}
 
 	return dosmode;
 }
@@ -1525,6 +1528,9 @@ static unsigned int vfs_gpfs_dosmode_to_winattrs(uint32_t dosmode)
 	if (dosmode & FILE_ATTRIBUTE_SPARSE) {
 		winattrs |= GPFS_WINATTR_SPARSE_FILE;
 	}
+	if (dosmode & FILE_ATTRIBUTE_OFFLINE) {
+		winattrs |= GPFS_WINATTR_OFFLINE;
+	}
 
 	return winattrs;
 }
@@ -2569,7 +2575,6 @@ static struct vfs_fn_pointers vfs_gpfs_fns = {
 	.fstat_fn = vfs_gpfs_fstat,
 	.lstat_fn = vfs_gpfs_lstat,
 	.ntimes_fn = vfs_gpfs_ntimes,
-	.is_offline_fn = vfs_gpfs_is_offline,
 	.aio_force_fn = vfs_gpfs_aio_force,
 	.sendfile_fn = vfs_gpfs_sendfile,
 	.fallocate_fn = vfs_gpfs_fallocate,
diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c
index 8f80221..d6a93f8 100644
--- a/source3/modules/vfs_media_harmony.c
+++ b/source3/modules/vfs_media_harmony.c
@@ -2368,79 +2368,6 @@ out:
 	return status;
 }
 
-/*
- * Success: return true
- * Failure: set errno, return false
- */
-static bool mh_is_offline(struct vfs_handle_struct *handle,
-		const struct smb_filename *fname,
-		SMB_STRUCT_STAT *sbuf)
-{
-	// check if sbuf is modified further down the chain.
-	bool ret;
-	struct smb_filename *clientFname;
-	TALLOC_CTX *ctx;
-
-	DEBUG(MH_INFO_DEBUG, ("Entering mh_is_offline\n"));
-	if (!is_in_media_files(fname->base_name))
-	{
-		ret = SMB_VFS_NEXT_IS_OFFLINE(handle, fname, sbuf);
-		goto out;
-	}
-
-	clientFname = NULL;
-	ctx = talloc_tos();
-
-	if(alloc_get_client_smb_fname(handle, ctx,
-				fname,
-				&clientFname))
-	{
-		ret = -1;
-		goto err;
-	}
-
-	ret = SMB_VFS_NEXT_IS_OFFLINE(handle, clientFname, sbuf);
-err:
-	TALLOC_FREE(clientFname);
-out:
-	return ret;
-}
-
-/*
- * Success: return 0 (?)
- * Failure: set errno, return -1
- */
-static int mh_set_offline(struct vfs_handle_struct *handle,
-		const struct smb_filename *fname)
-{
-	int status;
-	struct smb_filename *clientFname;
-	TALLOC_CTX *ctx;
-
-	DEBUG(MH_INFO_DEBUG, ("Entering mh_set_offline\n"));
-	if (!is_in_media_files(fname->base_name))
-	{
-		status = SMB_VFS_NEXT_SET_OFFLINE(handle, fname);
-		goto out;
-	}
-
-	clientFname = NULL;
-	ctx = talloc_tos();
-
-	if ((status = alloc_get_client_smb_fname(handle, ctx,
-				fname,
-				&clientFname)))
-	{
-		goto err;
-	}
-
-	status = SMB_VFS_NEXT_SET_OFFLINE(handle, clientFname);
-err:
-	TALLOC_FREE(clientFname);
-out:
-	return status;
-}
-
 /* VFS operations structure */
 
 static struct vfs_fn_pointers vfs_mh_fns = {
@@ -2502,10 +2429,6 @@ static struct vfs_fn_pointers vfs_mh_fns = {
 	.setxattr_fn = mh_setxattr,
 
 	/* aio operations */
-
-	/* offline operations */
-	.is_offline_fn = mh_is_offline,
-	.set_offline_fn = mh_set_offline
 };
 
 NTSTATUS vfs_media_harmony_init(void);
diff --git a/source3/modules/vfs_offline.c b/source3/modules/vfs_offline.c
index 5921f43..89aba83 100644
--- a/source3/modules/vfs_offline.c
+++ b/source3/modules/vfs_offline.c
@@ -19,6 +19,7 @@
  */
 
 #include "includes.h"
+#include "smbd/proto.h"
 
 static uint32_t offline_fs_capabilities(struct vfs_handle_struct *handle,
 					enum timestamp_set_resolution *p_ts_res)
@@ -27,16 +28,26 @@ static uint32_t offline_fs_capabilities(struct vfs_handle_struct *handle,
 	       FILE_SUPPORTS_REMOTE_STORAGE;
 }
 
-static bool offline_is_offline(struct vfs_handle_struct *handle,
-			       const struct smb_filename *fname,
-			       SMB_STRUCT_STAT *stbuf)
+static NTSTATUS offline_get_dos_attributes(struct vfs_handle_struct *handle,
+					   struct smb_filename *smb_fname,
+					   uint32_t *dosmode)
 {
-	return true;
+	*dosmode |= FILE_ATTRIBUTE_OFFLINE;
+	return get_ea_dos_attribute(handle->conn, smb_fname, dosmode);
+}
+
+static NTSTATUS offline_fget_dos_attributes(struct vfs_handle_struct *handle,
+					    struct files_struct *fsp,
+					    uint32_t *dosmode)
+{
+	*dosmode |= FILE_ATTRIBUTE_OFFLINE;
+	return get_ea_dos_attribute(handle->conn, fsp->fsp_name, dosmode);
 }
 
 static struct vfs_fn_pointers offline_fns = {
     .fs_capabilities_fn = offline_fs_capabilities,
-    .is_offline_fn = offline_is_offline,
+	.get_dos_attributes_fn = offline_get_dos_attributes,
+	.fget_dos_attributes_fn = offline_fget_dos_attributes,
 };
 
 NTSTATUS vfs_offline_init(void);
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index b3610ee..0de48ef 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -1828,7 +1828,8 @@ static NTSTATUS smb_time_fget_dos_attributes(struct vfs_handle_struct *handle,
 
 static NTSTATUS smb_time_set_dos_attributes(struct vfs_handle_struct *handle,
 					const struct smb_filename *smb_fname,
-					uint32_t dosmode)
+					uint32_t dosmode,
+					uint32_t old_attributes)
 {
 	NTSTATUS result;
 	struct timespec ts1,ts2;
@@ -1837,7 +1838,8 @@ static NTSTATUS smb_time_set_dos_attributes(struct vfs_handle_struct *handle,
 	clock_gettime_mono(&ts1);
 	result = SMB_VFS_NEXT_SET_DOS_ATTRIBUTES(handle,
 				smb_fname,
-				dosmode);
+				dosmode,
+				old_attributes);
 	clock_gettime_mono(&ts2);
 	timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
 
@@ -1852,7 +1854,8 @@ static NTSTATUS smb_time_set_dos_attributes(struct vfs_handle_struct *handle,
 
 static NTSTATUS smb_time_fset_dos_attributes(struct vfs_handle_struct *handle,
 					struct files_struct *fsp,
-					uint32_t dosmode)
+					uint32_t dosmode,
+					uint32_t old_attributes)
 {
 	NTSTATUS result;
 	struct timespec ts1,ts2;
@@ -1861,7 +1864,8 @@ static NTSTATUS smb_time_fset_dos_attributes(struct vfs_handle_struct *handle,
 	clock_gettime_mono(&ts1);
 	result = SMB_VFS_NEXT_FSET_DOS_ATTRIBUTES(handle,
 				fsp,
-				dosmode);
+				dosmode,
+				old_attributes);
 	clock_gettime_mono(&ts2);
 	timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
 
@@ -2495,45 +2499,6 @@ static bool smb_time_audit_aio_force(struct vfs_handle_struct *handle,
 	return result;
 }
 
-static bool smb_time_audit_is_offline(struct vfs_handle_struct *handle,
-				      const struct smb_filename *fname,
-				      SMB_STRUCT_STAT *sbuf)
-{
-	bool result;
-	struct timespec ts1,ts2;
-	double timediff;
-
-	clock_gettime_mono(&ts1);
-	result = SMB_VFS_NEXT_IS_OFFLINE(handle, fname, sbuf);
-	clock_gettime_mono(&ts2);
-	timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-	if (timediff > audit_timeout) {
-		smb_time_audit_log_smb_fname("is_offline", timediff, fname);
-	}
-
-	return result;
-}
-
-static int smb_time_audit_set_offline(struct vfs_handle_struct *handle,
-				      const struct smb_filename *fname)
-{
-	int result;
-	struct timespec ts1,ts2;
-	double timediff;
-
-	clock_gettime_mono(&ts1);
-	result = SMB_VFS_NEXT_SET_OFFLINE(handle, fname);
-	clock_gettime_mono(&ts2);
-	timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-	if (timediff > audit_timeout) {
-		smb_time_audit_log_smb_fname("set_offline", timediff, fname);
-	}
-
-	return result;
-}
-
 static NTSTATUS smb_time_audit_durable_cookie(struct vfs_handle_struct *handle,
 					      struct files_struct *fsp,
 					      TALLOC_CTX *mem_ctx,
@@ -2712,8 +2677,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
 	.setxattr_fn = smb_time_audit_setxattr,
 	.fsetxattr_fn = smb_time_audit_fsetxattr,
 	.aio_force_fn = smb_time_audit_aio_force,
-	.is_offline_fn = smb_time_audit_is_offline,
-	.set_offline_fn = smb_time_audit_set_offline,
 	.durable_cookie_fn = smb_time_audit_durable_cookie,
 	.durable_disconnect_fn = smb_time_audit_durable_disconnect,
 	.durable_reconnect_fn = smb_time_audit_durable_reconnect,
diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c
index 91daa6f..8a9b819 100644
--- a/source3/modules/vfs_tsmsm.c
+++ b/source3/modules/vfs_tsmsm.c
@@ -266,6 +266,33 @@ done:
 	return offline;
 }
 
+static NTSTATUS tsmsm_get_dos_attributes(struct vfs_handle_struct *handle,
+					 struct smb_filename *fname,
+					 uint32_t *dosmode)
+{
+	bool offline;
+
+	offline = tsmsm_is_offline(handle, fname, &fname->st);
+	if (offline) {
+		*dosmode |= FILE_ATTRIBUTE_OFFLINE;
+	}
+
+	return get_ea_dos_attribute(handle->conn, fname, dosmode);
+}
+
+static NTSTATUS tsmsm_fget_dos_attributes(struct vfs_handle_struct *handle,
+					  files_struct *fsp,
+					  uint32_t *dosmode)
+{
+	bool offline;
+
+	offline = tsmsm_is_offline(handle, fsp->fsp_name, &fsp->fsp_name->st);
+	if (offline) {
+		*dosmode |= FILE_ATTRIBUTE_OFFLINE;
+	}
+
+	return get_ea_dos_attribute(handle->conn, fsp->fsp_name, dosmode);
+}
 
 static bool tsmsm_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
 {
@@ -467,8 +494,8 @@ static ssize_t tsmsm_pwrite(struct vfs_handle_struct *handle, struct files_struc
 	return result;
 }
 
-static int tsmsm_set_offline(struct vfs_handle_struct *handle, 
-                             const struct smb_filename *fname)
+static NTSTATUS tsmsm_set_offline(struct vfs_handle_struct *handle, 
+				  const struct smb_filename *fname)
 {
 	struct tsmsm_struct *tsmd = (struct tsmsm_struct *) handle->data;
 	int result = 0;
@@ -479,27 +506,72 @@ static int tsmsm_set_offline(struct vfs_handle_struct *handle,
 	if (tsmd->hsmscript == NULL) {
 		/* no script enabled */
 		DEBUG(1, ("tsmsm_set_offline: No 'tsmsm:hsm script' configured\n"));
-		return 0;
+		return NT_STATUS_OK;
 	}
 
         status = get_full_smb_filename(talloc_tos(), fname, &path);
         if (!NT_STATUS_IS_OK(status)) {
-                errno = map_errno_from_nt_status(status);
-                return false;
+		return status;
         }
 
 	/* Now, call the script */
 	command = talloc_asprintf(tsmd, "%s offline \"%s\"", tsmd->hsmscript, path);
 	if(!command) {
 		DEBUG(1, ("tsmsm_set_offline: can't allocate memory to run hsm script"));
-		return -1;
+		return NT_STATUS_NO_MEMORY;
 	}
 	DEBUG(10, ("tsmsm_set_offline: Running [%s]\n", command));
 	if((result = smbrun(command, NULL)) != 0) {
 		DEBUG(1,("tsmsm_set_offline: Running [%s] returned %d\n", command, result));
+		TALLOC_FREE(command);
+		return NT_STATUS_INTERNAL_ERROR;
 	}
 	TALLOC_FREE(command);
-	return result;
+	return NT_STATUS_OK;
+}
+
+static NTSTATUS tsmsm_set_dos_attributes(struct vfs_handle_struct *handle,
+					 const struct smb_filename *smb_fname,
+					 uint32_t dosmode,
+					 uint32_t old_dosmode)
+{
+	NTSTATUS status;
+
+	status = set_ea_dos_attribute(handle->conn, smb_fname,
+				      dosmode, old_dosmode);
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (!(old_dosmode & FILE_ATTRIBUTE_OFFLINE) &&
+	    (dosmode & FILE_ATTRIBUTE_OFFLINE))
+	{
+		return NT_STATUS_OK;
+	}
+
+	return tsmsm_set_offline(handle, smb_fname);
+}
+
+static NTSTATUS tsmsm_fset_dos_attributes(struct vfs_handle_struct *handle,
+					  struct files_struct *fsp,
+					  uint32_t dosmode,
+					  uint32_t old_dosmode)
+{
+	NTSTATUS status;
+
+	status = set_ea_dos_attribute(handle->conn, fsp->fsp_name,
+				      dosmode, old_dosmode);
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (!(old_dosmode & FILE_ATTRIBUTE_OFFLINE) &&
+	    (dosmode & FILE_ATTRIBUTE_OFFLINE))
+	{
+		return NT_STATUS_OK;
+	}
+
+	return tsmsm_set_offline(handle, fsp->fsp_name);
 }
 
 static uint32_t tsmsm_fs_capabilities(struct vfs_handle_struct *handle,
@@ -519,8 +591,10 @@ static struct vfs_fn_pointers tsmsm_fns = {
 	.pwrite_send_fn = tsmsm_pwrite_send,
 	.pwrite_recv_fn = tsmsm_pwrite_recv,
 	.sendfile_fn = tsmsm_sendfile,
-	.is_offline_fn = tsmsm_is_offline,
-	.set_offline_fn = tsmsm_set_offline,
+	.set_dos_attributes_fn = tsmsm_set_dos_attributes,
+	.fset_dos_attributes_fn = tsmsm_fset_dos_attributes,
+	.get_dos_attributes_fn = tsmsm_get_dos_attributes,
+	.fget_dos_attributes_fn = tsmsm_fget_dos_attributes,
 };
 
 NTSTATUS vfs_tsmsm_init(void);
diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c
index 3b3493d..d8191e1 100644
--- a/source3/modules/vfs_unityed_media.c
+++ b/source3/modules/vfs_unityed_media.c
@@ -1806,59 +1806,6 @@ err:
 	return status;
 }
 
-static bool um_is_offline(struct vfs_handle_struct *handle,
-			  const struct smb_filename *fname,
-			  SMB_STRUCT_STAT *sbuf)
-{
-	bool ret;
-	struct smb_filename *client_fname = NULL;
-	int status;
-
-	DEBUG(10, ("Entering um_is_offline\n"));
-
-	if (!is_in_media_files(fname->base_name)) {
-		return SMB_VFS_NEXT_IS_OFFLINE(handle, fname, sbuf);
-	}
-
-	status = alloc_get_client_smb_fname(handle, talloc_tos(),
-					    fname, &client_fname);
-	if (status != 0) {
-		ret = false;
-		goto err;
-	}
-
-	ret = SMB_VFS_NEXT_IS_OFFLINE(handle, client_fname, sbuf);
-
-err:
-	TALLOC_FREE(client_fname);
-	return ret;
-}
-
-static int um_set_offline(struct vfs_handle_struct *handle,
-			  const struct smb_filename *fname)
-{
-	int status;
-	struct smb_filename *client_fname = NULL;
-
-	DEBUG(10, ("Entering um_set_offline\n"));
-
-	if (!is_in_media_files(fname->base_name)) {
-		return SMB_VFS_NEXT_SET_OFFLINE(handle, fname);
-	}
-
-	status = alloc_get_client_smb_fname(handle, talloc_tos(),
-					    fname, &client_fname);
-	if (status != 0) {
-		goto err;
-	}
-
-	status = SMB_VFS_NEXT_SET_OFFLINE(handle, client_fname);
-
-err:
-	TALLOC_FREE(client_fname);
-	return status;
-}
-
 static int um_connect(vfs_handle_struct *handle,
 			 const char *service,
 			 const char *user)
@@ -1956,12 +1903,6 @@ static struct vfs_fn_pointers vfs_um_fns = {
 	.listxattr_fn = um_listxattr,
 	.removexattr_fn = um_removexattr,
 	.setxattr_fn = um_setxattr,
-
-	/* aio operations */
-
-	/* offline operations */
-	.is_offline_fn = um_is_offline,
-	.set_offline_fn = um_set_offline
 };
 
 NTSTATUS vfs_unityed_media_init(void);
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index ef880e5..82d495a 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -374,7 +374,8 @@ NTSTATUS get_ea_dos_attribute(connection_struct *conn,
 
 NTSTATUS set_ea_dos_attribute(connection_struct *conn,
 			      const struct smb_filename *smb_fname,
-			      uint32_t dosmode)
+			      uint32_t dosmode,
+			      uint32_t old_attributes)
 {
 	struct xattr_DOSATTRIB dosattrib;
 	enum ndr_err_code ndr_err;
@@ -605,7 +606,6 @@ static uint32_t dos_mode_from_name(connection_struct *conn,
 uint32_t dos_mode(connection_struct *conn, struct smb_filename *smb_fname)
 {
 	uint32_t result = 0;
-	bool offline;
 	NTSTATUS status = NT_STATUS_OK;
 
 	DEBUG(8,("dos_mode: %s\n", smb_fname_str_dbg(smb_fname)));
@@ -620,11 +620,6 @@ uint32_t dos_mode(connection_struct *conn, struct smb_filename *smb_fname)
 		result |= dos_mode_from_sbuf(conn, smb_fname);
 	}
 
-	offline = SMB_VFS_IS_OFFLINE(conn, smb_fname, &smb_fname->st);
-	if (S_ISREG(smb_fname->st.st_ex_mode) && offline) {
-		result |= FILE_ATTRIBUTE_OFFLINE;
-	}
-
 	if (conn->fs_capabilities & FILE_FILE_COMPRESSION) {
 		bool compressed = false;
 		status = dos_mode_check_compressed(conn, smb_fname,
@@ -662,7 +657,6 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
 	mode_t unixmode;
 	int ret = -1, lret = -1;
 	uint32_t old_mode;
-	struct timespec new_create_timespec;
 	files_struct *fsp = NULL;
 	bool need_close = false;
 	NTSTATUS status;
@@ -672,8 +666,7 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
 		return -1;
 	}
 
-	/* We only allow READONLY|HIDDEN|SYSTEM|DIRECTORY|ARCHIVE here. */
-	dosmode &= (SAMBA_ATTRIBUTES_MASK | FILE_ATTRIBUTE_OFFLINE);
+	dosmode &= SAMBA_ATTRIBUTES_MASK;
 
 	DEBUG(10,("file_set_dosmode: setting dos mode 0x%x on file %s\n",
 		  dosmode, smb_fname_str_dbg(smb_fname)));
@@ -688,36 +681,10 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
 	else
 		dosmode &= ~FILE_ATTRIBUTE_DIRECTORY;
 
-	new_create_timespec = smb_fname->st.st_ex_btime;
-
 	old_mode = dos_mode(conn, smb_fname);
 
-	if ((dosmode & FILE_ATTRIBUTE_OFFLINE) &&
-	    !(old_mode & FILE_ATTRIBUTE_OFFLINE)) {
-		lret = SMB_VFS_SET_OFFLINE(conn, smb_fname);
-		if (lret == -1) {
-			if (errno == ENOTSUP) {
-				DEBUG(10, ("Setting FILE_ATTRIBUTE_OFFLINE for "
-					   "%s/%s is not supported.\n",
-					   parent_dir,
-					   smb_fname_str_dbg(smb_fname)));
-			} else {
-				DEBUG(0, ("An error occurred while setting "
-					  "FILE_ATTRIBUTE_OFFLINE for "
-					  "%s/%s: %s", parent_dir,
-					  smb_fname_str_dbg(smb_fname),
-					  strerror(errno)));
-			}
-		}
-	}
-
-	dosmode  &= ~FILE_ATTRIBUTE_OFFLINE;
-	old_mode &= ~FILE_ATTRIBUTE_OFFLINE;
-
-	smb_fname->st.st_ex_btime = new_create_timespec;
-
 	/* Store the DOS attributes in an EA by preference. */
-	status = SMB_VFS_SET_DOS_ATTRIBUTES(conn, smb_fname, dosmode);
+	status = SMB_VFS_SET_DOS_ATTRIBUTES(conn, smb_fname, dosmode, old_mode);
 	if (NT_STATUS_IS_OK(status)) {
 		if (!newfile) {
 			notify_fname(conn, NOTIFY_ACTION_MODIFIED,
@@ -921,7 +888,7 @@ NTSTATUS file_set_sparse(connection_struct *conn,
 	}
 
 	/* Store the DOS attributes in an EA. */
-	status = SMB_VFS_FSET_DOS_ATTRIBUTES(conn, fsp, new_dosmode);
+	status = SMB_VFS_FSET_DOS_ATTRIBUTES(conn, fsp, new_dosmode, old_dosmode);
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
 	}
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index fb30a9e..07d85bf 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -280,7 +280,8 @@ NTSTATUS get_ea_dos_attribute(connection_struct *conn,
 			      uint32_t *pattr);
 NTSTATUS set_ea_dos_attribute(connection_struct *conn,
 			      const struct smb_filename *smb_fname,
-			      uint32_t dosmode);
+			      uint32_t dosmode,
+			      uint32_t old_attributes);
 
 NTSTATUS set_create_timespec_ea(connection_struct *conn,
 				const struct smb_filename *smb_fname,
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 45562ee..2938056 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -2250,18 +2250,20 @@ NTSTATUS smb_vfs_call_fget_dos_attributes(struct vfs_handle_struct *handle,
 
 NTSTATUS smb_vfs_call_set_dos_attributes(struct vfs_handle_struct *handle,
 					 const struct smb_filename *smb_fname,
-					 uint32_t dosmode)
+					 uint32_t dosmode,
+					 uint32_t old_attributes)
 {
 	VFS_FIND(set_dos_attributes);
-	return handle->fns->set_dos_attributes_fn(handle, smb_fname, dosmode);
+	return handle->fns->set_dos_attributes_fn(handle, smb_fname, dosmode, old_attributes);
 }
 
 NTSTATUS smb_vfs_call_fset_dos_attributes(struct vfs_handle_struct *handle,
 					  struct files_struct *fsp,
-					  uint32_t dosmode)
+					  uint32_t dosmode,
+					  uint32_t old_attributes)
 {
 	VFS_FIND(set_dos_attributes);
-	return handle->fns->fset_dos_attributes_fn(handle, fsp, dosmode);
+	return handle->fns->fset_dos_attributes_fn(handle, fsp, dosmode, old_attributes);
 }
 
 struct tevent_req *smb_vfs_call_copy_chunk_send(struct vfs_handle_struct *handle,
@@ -2531,21 +2533,6 @@ bool smb_vfs_call_aio_force(struct vfs_handle_struct *handle,
 	return handle->fns->aio_force_fn(handle, fsp);
 }
 
-bool smb_vfs_call_is_offline(struct vfs_handle_struct *handle,
-			     const struct smb_filename *fname,
-			     SMB_STRUCT_STAT *sbuf)
-{
-	VFS_FIND(is_offline);
-	return handle->fns->is_offline_fn(handle, fname, sbuf);
-}
-
-int smb_vfs_call_set_offline(struct vfs_handle_struct *handle,
-                             const struct smb_filename *fname)
-{
-	VFS_FIND(set_offline);
-	return handle->fns->set_offline_fn(handle, fname);
-}
-
 NTSTATUS smb_vfs_call_durable_cookie(struct vfs_handle_struct *handle,
 				     struct files_struct *fsp,
 				     TALLOC_CTX *mem_ctx,
-- 
2.7.4



More information about the samba-technical mailing list