Following errors are seen when Samba's VFS module for GlusterFS is compiled against glusterfs api: ../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_pread’: ../source3/modules/vfs_glusterfs.c:605:9: error: too few arguments to function ‘glfs_pread’ return glfs_pread(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle, fsp), data, n, offset, 0); ^~~~~~~~~~ In file included from ../source3/modules/vfs_glusterfs.c:41:0: /usr/local/include/glusterfs/api/glfs.h:538:9: note: declared here ssize_t glfs_pread (glfs_fd_t *fd, void *buf, size_t count, off_t offset, ^~~~~~~~~~ ../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_pread_send’: ../source3/modules/vfs_glusterfs.c:814:31: warning: passing argument 6 of ‘glfs_pread_async’ from incompatible pointer type [-Wincompatible-pointer-types] fsp), data, n, offset, 0, aio_glusterfs_done, ^~~~~~~~~~~~~~~~~~ In file included from ../source3/modules/vfs_glusterfs.c:41:0: /usr/local/include/glusterfs/api/glfs.h:545:5: note: expected ‘glfs_io_cbk {aka void (*)(struct glfs_fd *, long int, struct stat *, struct stat *, void *)}’ but argument is of type ‘void (*)(glfs_fd_t *, ssize_t, void *) {aka void (*)(struct glfs_fd *, long int, void *)}’ int glfs_pread_async (glfs_fd_t *fd, void *buf, size_t count, off_t offset, ^~~~~~~~~~~~~~~~ ../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_pwrite_send’: ../source3/modules/vfs_glusterfs.c:850:31: warning: passing argument 6 of ‘glfs_pwrite_async’ from incompatible pointer type [-Wincompatible-pointer-types] fsp), data, n, offset, 0, aio_glusterfs_done, ^~~~~~~~~~~~~~~~~~ In file included from ../source3/modules/vfs_glusterfs.c:41:0: /usr/local/include/glusterfs/api/glfs.h:548:5: note: expected ‘glfs_io_cbk {aka void (*)(struct glfs_fd *, long int, struct stat *, struct stat *, void *)}’ but argument is of type ‘void (*)(glfs_fd_t *, ssize_t, void *) {aka void (*)(struct glfs_fd *, long int, void *)}’ int glfs_pwrite_async (glfs_fd_t *fd, const void *buf, int count, off_t offset, ^~~~~~~~~~~~~~~~~ ../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_pwrite’: ../source3/modules/vfs_glusterfs.c:900:9: error: too few arguments to function ‘glfs_pwrite’ return glfs_pwrite(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle, fsp), data, n, offset, 0); ^~~~~~~~~~~ In file included from ../source3/modules/vfs_glusterfs.c:41:0: /usr/local/include/glusterfs/api/glfs.h:541:9: note: declared here ssize_t glfs_pwrite (glfs_fd_t *fd, const void *buf, size_t count, ^~~~~~~~~~~ ../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_fsync’: ../source3/modules/vfs_glusterfs.c:937:9: error: too few arguments to function ‘glfs_fsync’ return glfs_fsync(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle, fsp)); ^~~~~~~~~~ In file included from ../source3/modules/vfs_glusterfs.c:41:0: /usr/local/include/glusterfs/api/glfs.h:590:5: note: declared here int glfs_fsync (glfs_fd_t *fd, struct stat *prestat, ^~~~~~~~~~ ../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_fsync_send’: ../source3/modules/vfs_glusterfs.c:964:11: warning: passing argument 2 of ‘glfs_fsync_async’ from incompatible pointer type [-Wincompatible-pointer-types] fsp), aio_glusterfs_done, state); ^~~~~~~~~~~~~~~~~~ In file included from ../source3/modules/vfs_glusterfs.c:41:0: /usr/local/include/glusterfs/api/glfs.h:593:5: note: expected ‘glfs_io_cbk {aka void (*)(struct glfs_fd *, long int, struct stat *, struct stat *, void *)}’ but argument is of type ‘void (*)(glfs_fd_t *, ssize_t, void *) {aka void (*)(struct glfs_fd *, long int, void *)}’ int glfs_fsync_async (glfs_fd_t *fd, glfs_io_cbk fn, void *data) __THROW ^~~~~~~~~~~~~~~~ ../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_ftruncate’: ../source3/modules/vfs_glusterfs.c:1147:9: error: too few arguments to function ‘glfs_ftruncate’ return glfs_ftruncate(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle, fsp), offset); ^~~~~~~~~~~~~~ In file included from ../source3/modules/vfs_glusterfs.c:41:0: /usr/local/include/glusterfs/api/glfs.h:576:5: note: declared here int glfs_ftruncate (glfs_fd_t *fd, off_t length, struct stat *prestat, ^~~~~~~~~~~~~~ Waf: Leaving directory `/root/samba.git/bin' Build failed: -> task failed (err #1): {task: cc vfs_glusterfs.c -> vfs_glusterfs_89.o} make: *** [Makefile:8: all] Error 1 source code HEAD ---------------- GlusterFS master @ a96c7e748fccfa796a712b6aac92206212915cdc Samba master @ 7f625f9b27b229f74a88dfe6d86fadd060c47160 Additional note: See below for recent commits from GlusterFS which changed signature for some APIs used in vfs_glusterfs: http://git.gluster.org/cgit/glusterfs.git/commit/?id=d01f7244e9d9f7e3ef84e0ba7b48ef1b1b09d809 http://git.gluster.org/cgit/glusterfs.git/commit/?id=09943beb499617212f2985ca8ea9ecd1ed1b470e http://git.gluster.org/cgit/glusterfs.git/commit/?id=248152767b0599986bbb6bb35fc27197f6be6964 http://git.gluster.org/cgit/glusterfs.git/commit/?id=384562b294e9a7847403961e878a4daa0fff33eb
(In reply to Anoop C S from comment #0) The signature changes from GlusterFS API are incomplete as of now. Waiting for those changes to stabilize for the upcoming major version.. For the time being the attached patch works.
Created attachment 14102 [details] test-patch
Anoop, is this change still relevant?
(In reply to Guenther Deschner from comment #3) Yes it is. I hope this api change has been stabilized recently and will be available with glusterfs v6 onwards. I will confirm and update here.
(In reply to Anoop C S from comment #4) I got a confirmation that API signatures are finalized with v6. I will shortly attach the final patch.
Created attachment 14792 [details] final patch
Created attachment 14823 [details] patch from master for v4.8, v4.9 and v4.10
Comment on attachment 14823 [details] patch from master for v4.8, v4.9 and v4.10 LGTM.
Re-assigning to Karolin for inclusion in 4.10.rcNext, 4.9.next, 4.8.next.
(In reply to Jeremy Allison from comment #9) Pushed to autobuild-v4-{10,9,8}-test.
(In reply to Karolin Seeger from comment #10) Pushed to all branches. Closing out bug report. Thanks!
Anoop, in https://bugzilla.samba.org/show_bug.cgi?id=13330#c5 you state that the API changes were in version 6, but the patch that went into master and the release branches adds a check for version 7.6+. Looking at the Gluster sources, the glfs functions in question (fsync, read ...) were indeed changed with version 6: https://github.com/gluster/glusterfs/blob/release-6/api/src/glfs.h Can you please clarify?
Ah, ok, I think I understand it now. configure.ac has a comment on the glfs API modversion string: <https://github.com/gluster/glusterfs/blob/release-6/configure.ac#L1550> It seems glfs API modversion != symbol version mapfile, which is what initially confused me as fsync was at version6 in the map file: https://github.com/gluster/glusterfs/blob/master/api/src/gfapi.map Sorry for the noise! :)