[SCM] Samba Shared Repository - branch v3-6-test updated

Jeremy Allison jra at samba.org
Fri Feb 18 10:55:47 MST 2011


The branch, v3-6-test has been updated
       via  f6ac3bb Fix alignment issues in SPOOLSS "BUFFER" marshalling. Guenther and Metze please check ! (cherry picked from commit 8b881e7b6f3b0089ea874b3decd49379b963eb63)
       via  b7acfce s3:vfs:syncops add option to disable metasync per share
      from  8c86c25 tevent: Fix a comment

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit f6ac3bb3cf499b658774fe9317d91b7570d2fa32
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Feb 18 09:01:46 2011 -0800

    Fix alignment issues in SPOOLSS "BUFFER" marshalling.
    Guenther and Metze please check !
    (cherry picked from commit 8b881e7b6f3b0089ea874b3decd49379b963eb63)

commit b7acfce50b21389fd391c228a6e4444ef7fcf91e
Author: Christian Ambach <christian.ambach at de.ibm.com>
Date:   Fri Feb 18 13:03:52 2011 +0100

    s3:vfs:syncops add option to disable metasync per share
    
    introduce an option to disable the metadata sync
    in case the filesystem handles this correctly the sync can be
    skipped, but synchronization of the data that was written can still
    be configured (in opposition to the disable flag disabling all
    sync operations)
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Fri Feb 18 17:31:59 CET 2011 on sn-devel-104
    (cherry picked from commit d05aa90384082c348113021500ac15716d060ead)

-----------------------------------------------------------------------

Summary of changes:
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm |    7 +++++++
 source3/modules/vfs_syncops.c            |   18 ++++++++++++++----
 2 files changed, 21 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 075ad85..eda583e 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -1281,12 +1281,19 @@ sub ParseStructPushPrimitives($$$$$)
 sub ParseStructPushDeferred($$$$)
 {
 	my ($self, $struct, $ndr, $varname, $env) = @_;
+
 	if (defined($struct->{PROPERTIES}{relative_base})) {
+		$self->pidl("NDR_CHECK(ndr_push_align($ndr, $struct->{ALIGN}));");
+
 		# retrieve the current offset as base for relative pointers
 		# based on the toplevel struct/union
 		$self->pidl("NDR_CHECK(ndr_push_setup_relative_base_offset2($ndr, $varname));");
 	}
 	$self->ParseElementPush($_, $ndr, $env, 0, 1) foreach (@{$struct->{ELEMENTS}});
+
+	if (defined($struct->{PROPERTIES}{relative_base})) {
+		$self->pidl("NDR_CHECK(ndr_push_trailer_align($ndr, $struct->{ALIGN}));");
+	}
 }
 
 #####################################################################
diff --git a/source3/modules/vfs_syncops.c b/source3/modules/vfs_syncops.c
index 2b7c2a3..76072ab 100644
--- a/source3/modules/vfs_syncops.c
+++ b/source3/modules/vfs_syncops.c
@@ -2,6 +2,7 @@
  * ensure meta data operations are performed synchronously
  *
  * Copyright (C) Andrew Tridgell     2007
+ * Copyright (C) Christian Ambach, 2010-2011
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -37,13 +38,19 @@
      syncops:onclose = no
   that can be set either globally or per share.
 
-  you can also disable the module completely for a service with
+  On certain filesystems that only require the last data written to be
+  fsync()'ed, you can disable the metadata synchronization of this module with
+     syncops:onmeta = no
+  This option can be set either globally or per share.
+
+  you can also disable the module completely for a share with
      syncops:disable = true
 
  */
 
 struct syncops_config_data {
 	bool onclose;
+	bool onmeta;
 	bool disable;
 };
 
@@ -142,7 +149,7 @@ static int syncops_rename(vfs_handle_struct *handle,
 				return -1);
 
 	ret = SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
-	if (ret == 0 && !config->disable) {
+	if (ret == 0 && config->onmeta && !config->disable) {
 		syncops_two_names(smb_fname_src->base_name,
 				  smb_fname_dst->base_name);
 	}
@@ -158,7 +165,7 @@ static int syncops_rename(vfs_handle_struct *handle,
 				return -1); \
 	ret = SMB_VFS_NEXT_ ## op args; \
 	if (ret == 0 \
-		&& !config->disable \
+		&& config->onmeta && !config->disable  \
 		&& fname) syncops_name(fname); \
 	return ret; \
 } while (0)
@@ -171,7 +178,7 @@ static int syncops_rename(vfs_handle_struct *handle,
 				return -1); \
 	ret = SMB_VFS_NEXT_ ## op args; \
 	if (ret == 0 \
-	&& !config->disable \
+	&& config->onmeta && !config->disable \
 	&& fname) syncops_smb_fname(fname); \
 	return ret; \
 } while (0)
@@ -255,6 +262,9 @@ int syncops_connect(struct vfs_handle_struct *handle, const char *service,
 	config->onclose = lp_parm_bool(SNUM(handle->conn), "syncops",
 					"onclose", true);
 
+	config->onmeta = lp_parm_bool(SNUM(handle->conn), "syncops",
+					"onmeta", true);
+
 	config->disable = lp_parm_bool(SNUM(handle->conn), "syncops",
 					"disable", false);
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list