summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2018-03-20 11:32:20 +0530
committerKarolin Seeger <kseeger@samba.org>2019-02-05 15:33:28 +0100
commit3477e19d742e08c946c565f1f9c30e5db16d1c15 (patch)
tree606e3ed5b89c0bb9a211e96fcfa4bb39f7f0f490
parent6ddc44fbb7a1c432a31908b8f11c5553c5a42a10 (diff)
downloadsamba-3477e19d742e08c946c565f1f9c30e5db16d1c15.tar.gz
vfs_glusterfs: Adapt to changes in libgfapi signatures
VFS module for GlusterFS fails to compile due to recent changes done to some API signatures. Therefore adding missing arguments to those APIs adapting to new signatures. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13330 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sun Feb 3 17:00:33 CET 2019 on sn-devel-144 (cherry picked from commit 0e3eda5bab5ae9316a42725aea048fb350020ec7)
-rw-r--r--source3/modules/vfs_glusterfs.c19
-rw-r--r--source3/wscript3
2 files changed, 22 insertions, 0 deletions
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index e32456f60b3..c6037d6c767 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -628,7 +628,11 @@ static ssize_t vfs_gluster_pread(struct vfs_handle_struct *handle,
return -1;
}
+#ifdef HAVE_GFAPI_VER_7_6
+ return glfs_pread(glfd, data, n, offset, 0, NULL);
+#else
return glfs_pread(glfd, data, n, offset, 0);
+#endif
}
struct glusterfs_aio_state;
@@ -659,7 +663,14 @@ static int aio_wrapper_destructor(struct glusterfs_aio_wrapper *wrap)
* threads once the async IO submitted is complete. To notify
* Samba of the completion we use a pipe based queue.
*/
+#ifdef HAVE_GFAPI_VER_7_6
+static void aio_glusterfs_done(glfs_fd_t *fd, ssize_t ret,
+ struct glfs_stat *prestat,
+ struct glfs_stat *poststat,
+ void *data)
+#else
static void aio_glusterfs_done(glfs_fd_t *fd, ssize_t ret, void *data)
+#endif
{
struct glusterfs_aio_state *state = NULL;
int sts = 0;
@@ -958,7 +969,11 @@ static ssize_t vfs_gluster_pwrite(struct vfs_handle_struct *handle,
return -1;
}
+#ifdef HAVE_GFAPI_VER_7_6
+ return glfs_pwrite(glfd, data, n, offset, 0, NULL, NULL);
+#else
return glfs_pwrite(glfd, data, n, offset, 0);
+#endif
}
static off_t vfs_gluster_lseek(struct vfs_handle_struct *handle,
@@ -1243,7 +1258,11 @@ static int vfs_gluster_ftruncate(struct vfs_handle_struct *handle,
return -1;
}
+#ifdef HAVE_GFAPI_VER_7_6
+ return glfs_ftruncate(glfd, offset, NULL, NULL);
+#else
return glfs_ftruncate(glfd, offset);
+#endif
}
static int vfs_gluster_fallocate(struct vfs_handle_struct *handle,
diff --git a/source3/wscript b/source3/wscript
index 31bd7333bdd..6677406b10a 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1568,6 +1568,9 @@ main() {
conf.CHECK_CFG(package='glusterfs-api', args='"glusterfs-api >= 6" --cflags --libs',
msg='Checking for glusterfs-api >= 6',
uselib_store="GFAPI_VER_6")
+ 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")
else:
conf.SET_TARGET_TYPE('gfapi', 'EMPTY')
conf.undefine('HAVE_GLUSTERFS')