[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Mon May 16 07:01:01 MDT 2011


The branch, master has been updated
       via  3358d5a s3: Document gpfs:syncio
       via  2ddfbbb gpfs.so: Add gpfs:syncio option
      from  a2115b5 waf: Enable Samba3 torture tests in top level build.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3358d5a7cae1c2a99495c38069531fc87fe22b24
Author: Volker Lendecke <vl at samba.org>
Date:   Mon May 16 13:30:26 2011 +0200

    s3: Document gpfs:syncio
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Mon May 16 15:00:40 CEST 2011 on sn-devel-104

commit 2ddfbbbdba0003fda85f2d1c0be87ceca2586e5d
Author: Gregor Beck <gbeck at sernet.de>
Date:   Thu May 5 16:28:58 2011 +0200

    gpfs.so: Add gpfs:syncio option
    
    This enables optimizations for shared file access on gpfs

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

Summary of changes:
 docs-xml/manpages-3/vfs_gpfs.8.xml |   20 ++++++++++++++++++++
 source3/modules/vfs_gpfs.c         |   13 +++++++++++++
 2 files changed, 33 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/vfs_gpfs.8.xml b/docs-xml/manpages-3/vfs_gpfs.8.xml
index 5f89ffa..a6b3124 100644
--- a/docs-xml/manpages-3/vfs_gpfs.8.xml
+++ b/docs-xml/manpages-3/vfs_gpfs.8.xml
@@ -276,6 +276,26 @@
 		</listitem>
 		</varlistentry>
 
+		<varlistentry>
+		<term>gpfs:syncio = [yes|no]</term>
+		<listitem>
+		<para>This parameter makes Samba open all files with O_SYNC.
+		  This triggers optimizations in GPFS for workloads that
+		  heavily share files.</para>
+
+		<para>Following is the behaviour of Samba for different
+		  values:
+		</para>
+		<itemizedlist>
+		<listitem><para><command>yes</command>Open files with O_SYNC
+		</para></listitem>
+		<listitem><para><command>no (default)</command>Open files as
+		    normal Samba would do
+		</para></listitem>
+		</itemizedlist>
+		</listitem>
+		</varlistentry>
+
 	</variablelist>
 </refsect1>
 
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index d52122c..0a684e0 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -32,6 +32,7 @@
 #include <gpfs_gpl.h>
 #include "nfs4_acls.h"
 #include "vfs_gpfs.h"
+#include "system/filesys.h"
 
 struct gpfs_config_data {
 	bool sharemodes;
@@ -1299,6 +1300,17 @@ static uint32_t vfs_gpfs_capabilities(struct vfs_handle_struct *handle,
 	return next;
 }
 
+static int vfs_gpfs_open(struct vfs_handle_struct *handle,
+			 struct smb_filename *smb_fname, files_struct *fsp,
+			 int flags, mode_t mode)
+{
+	if (lp_parm_bool(fsp->conn->params->service, "gpfs", "syncio",
+			 false)) {
+		flags |= O_SYNC;
+	}
+	return SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode);
+}
+
 
 static struct vfs_fn_pointers vfs_gpfs_fns = {
 	.connect_fn = vfs_gpfs_connect,
@@ -1326,6 +1338,7 @@ static struct vfs_fn_pointers vfs_gpfs_fns = {
 	.is_offline = vfs_gpfs_is_offline,
 	.aio_force = vfs_gpfs_aio_force,
 	.sendfile = vfs_gpfs_sendfile,
+	.open_fn = vfs_gpfs_open,
 	.ftruncate = vfs_gpfs_ftruncate
 };
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list