[SCM] Samba Shared Repository - branch v4-12-test updated
Karolin Seeger
kseeger at samba.org
Thu Nov 5 12:28:02 UTC 2020
The branch, v4-12-test has been updated
via 9215dc9dc69 s3-vfs_glusterfs: always disable write-behind translator
from 15c35524a27 VERSION: Bump version up to 4.12.11...
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-12-test
- Log -----------------------------------------------------------------
commit 9215dc9dc69c76082d251b94b2d79c9129a732a3
Author: Günther Deschner <gd at samba.org>
Date: Mon Nov 2 16:10:44 2020 +0100
s3-vfs_glusterfs: always disable write-behind translator
The "pass-through" option has now been merged upstream as of:
https://github.com/gluster/glusterfs/pull/1640
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14486
Guenther
Signed-off-by: Guenther Deschner <gd at samba.org>
Pair-Programmed-With: Anoop C S <anoopcs at samba.org>
Pair-Programmed-With: Sachin Prabhu <sprabhu at redhat.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Wed Nov 4 22:53:49 UTC 2020 on sn-devel-184
(cherry picked from commit a51cda69ec6a017ad04b5690a3ae67a5478deee9)
Autobuild-User(v4-12-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-12-test): Thu Nov 5 12:27:28 UTC 2020 on sn-devel-184
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_glusterfs.c | 20 +++++++++++++++++---
source3/wscript | 3 +++
2 files changed, 20 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index b733adfff5c..3f00e87c5e0 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -363,6 +363,7 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
glfs_t *fs = NULL;
TALLOC_CTX *tmp_ctx;
int ret = 0;
+ bool write_behind_pass_through_set = false;
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
@@ -429,6 +430,17 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
goto done;
}
+#ifdef HAVE_GFAPI_VER_7_9
+ ret = glfs_set_xlator_option(fs, "*-write-behind", "pass-through",
+ "true");
+ if (ret < 0) {
+ DBG_ERR("%s: Failed to set xlator option: pass-through\n",
+ volume);
+ goto done;
+ }
+ write_behind_pass_through_set = true;
+#endif
+
ret = glfs_set_logging(fs, logfile, loglevel);
if (ret < 0) {
DEBUG(0, ("%s: Failed to set logfile %s loglevel %d\n",
@@ -443,9 +455,11 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
goto done;
}
- ret = check_for_write_behind_translator(tmp_ctx, fs, volume);
- if (ret < 0) {
- goto done;
+ if (!write_behind_pass_through_set) {
+ ret = check_for_write_behind_translator(tmp_ctx, fs, volume);
+ if (ret < 0) {
+ goto done;
+ }
}
ret = glfs_set_preopened(volume, handle->conn->connectpath, fs);
diff --git a/source3/wscript b/source3/wscript
index 6d5bd22ca49..1176f6fdc29 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1742,6 +1742,9 @@ main() {
conf.CHECK_CFG(package='glusterfs-api', args='"glusterfs-api >= 7.6" --cflags --libs',
msg='Checking for glusterfs-api >= 7.6',
uselib_store="GFAPI_VER_7_6")
+ conf.CHECK_CFG(package='glusterfs-api', args='"glusterfs-api >= 7.9" --cflags --libs',
+ msg='Checking for glusterfs-api >= 7.9',
+ uselib_store="GFAPI_VER_7_9")
else:
conf.SET_TARGET_TYPE('gfapi', 'EMPTY')
conf.undefine('HAVE_GLUSTERFS')
--
Samba Shared Repository
More information about the samba-cvs
mailing list