diff options
author | Gregor Beck <gbeck@sernet.de> | 2011-05-05 16:28:58 +0200 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-05-16 13:58:24 +0200 |
commit | 2ddfbbbdba0003fda85f2d1c0be87ceca2586e5d (patch) | |
tree | f7c100a2433e175e25abe09217bd3c27abafc3dd /source3 | |
parent | a2115b56268bc71e69930a3d1dffa21ade7ad113 (diff) | |
download | samba-2ddfbbbdba0003fda85f2d1c0be87ceca2586e5d.tar.gz samba-2ddfbbbdba0003fda85f2d1c0be87ceca2586e5d.tar.bz2 samba-2ddfbbbdba0003fda85f2d1c0be87ceca2586e5d.zip |
gpfs.so: Add gpfs:syncio option
This enables optimizations for shared file access on gpfs
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_gpfs.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index d52122c25b..0a684e0d8e 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 }; |