The branch, v3-6-test has been updated via 40d20d1 s3: Document gpfs:syncio via 88c14b4 gpfs.so: Add gpfs:syncio option from dae276b s3:libsmb convert user-specified domain to uppercase
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log ----------------------------------------------------------------- commit 40d20d13e78868e312201ba4345730fd6ab36b41 Author: Volker Lendecke <v...@samba.org> Date: Mon May 16 13:30:26 2011 +0200 s3: Document gpfs:syncio Autobuild-User: Volker Lendecke <vlen...@samba.org> Autobuild-Date: Mon May 16 15:00:40 CEST 2011 on sn-devel-104 (cherry picked from commit 3358d5a7cae1c2a99495c38069531fc87fe22b24) commit 88c14b4a14a7713861443244bac9ff95774e38ed Author: Gregor Beck <gb...@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 (cherry picked from commit 2ddfbbbdba0003fda85f2d1c0be87ceca2586e5d) ----------------------------------------------------------------------- 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 7d5d199..08e5f55 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