Bug 1328502 - Move FOP enumerations and other network protocol bits to XDR generated headers
Summary: Move FOP enumerations and other network protocol bits to XDR generated headers
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: rpc
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Niels de Vos
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1303829
TreeView+ depends on / blocked
 
Reported: 2016-04-19 14:18 UTC by Niels de Vos
Modified: 2016-06-16 14:04 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-16 14:04:01 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Niels de Vos 2016-04-19 14:18:33 UTC
The network protocol is defined partially in the glusterfs.h file and in several .x files under rpc/xdr/. We should be cautious when modifying the network protocol, placing all definitions and structures in XDR generated headers (and sources) should help us with that.

Comment 1 Vijay Bellur 2016-04-19 14:29:19 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#1) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 2 Vijay Bellur 2016-04-19 16:33:21 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#2) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 3 Vijay Bellur 2016-04-19 16:33:31 UTC
REVIEW: http://review.gluster.org/14035 (snapshot: svc_stat collides with define from /usr/include/rpc/svc.h) posted (#1) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 4 Vijay Bellur 2016-04-19 21:07:39 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#3) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 5 Vijay Bellur 2016-04-19 21:16:32 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#4) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 6 Vijay Bellur 2016-04-21 14:58:01 UTC
REVIEW: http://review.gluster.org/14035 (snapshot: svc_stat collides with define from /usr/include/rpc/svc.h) posted (#2) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 7 Vijay Bellur 2016-04-21 14:58:08 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#5) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 8 Vijay Bellur 2016-04-21 16:01:59 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#6) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 9 Vijay Bellur 2016-04-21 16:18:18 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#7) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 10 Vijay Bellur 2016-04-21 18:02:34 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#8) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 11 Vijay Bellur 2016-04-21 19:12:18 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#9) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 12 Vijay Bellur 2016-04-21 19:30:06 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#10) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 13 Vijay Bellur 2016-04-21 19:42:21 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#11) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 14 Vijay Bellur 2016-04-23 18:12:56 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#12) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 15 Vijay Bellur 2016-04-24 13:30:53 UTC
REVIEW: http://review.gluster.org/14035 (snapshot: svc_stat collides with define from /usr/include/rpc/svc.h) posted (#3) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 16 Vijay Bellur 2016-04-26 14:57:16 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#13) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 17 Vijay Bellur 2016-04-26 15:12:16 UTC
REVIEW: http://review.gluster.org/14035 (snapshot: svc_stat collides with define from /usr/include/rpc/svc.h) posted (#4) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 18 Vijay Bellur 2016-04-26 15:12:18 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#14) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 19 Vijay Bellur 2016-04-26 18:10:13 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#15) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 20 Vijay Bellur 2016-04-27 09:11:59 UTC
COMMIT: http://review.gluster.org/14035 committed in master by Niels de Vos (ndevos@redhat.com) 
------
commit 60cf56b1289bbf574a38a7f99f8cacb692f65474
Author: Niels de Vos <ndevos@redhat.com>
Date:   Mon Apr 18 19:34:26 2016 +0200

    snapshot: svc_stat collides with define from /usr/include/rpc/svc.h
    
    Compiling fails with this error:
    
        snapview-client.c:559:24: error: macro "svc_stat" passed 4 arguments, but takes just 1
                   dict_t *xdata)
                                ^
        snapview-client.c:560:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
         {
         ^
        snapview-client.c:2412:26: error: ‘svc_stat’ undeclared here (not in a function)
                 .stat          = svc_stat,
                                  ^
    
    svc_* is the common prefix for (SUN)RPC functions provided by system
    headers. svc_stat() seems to be an existing function name. This happens
    because change-id I98fc8cf7e4b631082c7b203b5a0a77111bec1fb9 causes
    <rpc/rpc.h> included through "glusterfs.h". Prepending gf_ for all svc_*
    functions works around the symbol collision.
    
    Change-Id: Idc86b719c48675a5154c54d844c1899d14d46e2a
    BUG: 1328502
    Signed-off-by: Niels de Vos <ndevos@redhat.com>
    Reviewed-on: http://review.gluster.org/14035
    Smoke: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
    Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>

Comment 21 Vijay Bellur 2016-04-27 12:57:44 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#16) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 22 Vijay Bellur 2016-04-28 08:33:26 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#17) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 23 Vijay Bellur 2016-04-28 09:17:35 UTC
REVIEW: http://review.gluster.org/14032 (rpc: split FOPs enum from glusterfs.h) posted (#18) for review on master by Niels de Vos (ndevos@redhat.com)

Comment 24 Vijay Bellur 2016-04-28 20:51:15 UTC
COMMIT: http://review.gluster.org/14032 committed in master by Jeff Darcy (jdarcy@redhat.com) 
------
commit 2f945b86d30eca3a32f5e8e42fbe692ddf4b55be
Author: Niels de Vos <ndevos@redhat.com>
Date:   Mon Apr 18 21:47:18 2016 +0200

    rpc: split FOPs enum from glusterfs.h
    
    Moving the enumeration of FOPs and some of the other parts that are
    defining the network protocol to the rpc/xdr/ section. These structures
    need some care when modifications are made, moving them out of the
    common glusterfs.h header helps with that.
    
    The protocol definition structures are generated in a new glusterfs-fops
    header. This file is present in rpc/xdr/src/ and libglusterfs/src/, it
    is a little ugly, but prevents the need to update all Makefile.am files
    with the additional -I option for finding the new header file.
    
    The generation of the .c and .h files from the .x descriptions needed
    small modifications to accommodate these changes. The build/xdrgen
    script was improved slightly for this. The .c and .h files are
    incorrectly in the $(top_srcdir), instead of $(top_builddir). This is
    an existing issue, and bug 1330604 has been filed to get that addressed.
    
    Change-Id: I98fc8cf7e4b631082c7b203b5a0a77111bec1fb9
    BUG: 1328502
    Signed-off-by: Niels de Vos <ndevos@redhat.com>
    Reviewed-on: http://review.gluster.org/14032
    Smoke: Gluster Build System <jenkins@build.gluster.com>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    Reviewed-by: Jeff Darcy <jdarcy@redhat.com>

Comment 25 Niels de Vos 2016-06-16 14:04:01 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


Note You need to log in before you can comment on or make changes to this bug.