Bug 765220 (GLUSTER-3488)

Summary: the *-xdr.[ch] should always be populated by 'rpcgen' only
Product: [Community] GlusterFS Reporter: Amar Tumballi <amarts>
Component: protocolAssignee: Amar Tumballi <amarts>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: mainlineCC: gluster-bugs, rahulcs, vraman
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: master Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Amar Tumballi 2011-08-29 05:51:56 UTC
So that the person adding one more xdr structure should be doing a '.x' file definition and be able to use the structure/procedure in code.

Current plan is to have a script which will run 'rpcgen' on the .x file and make sure the '.[ch]' files are generated. So we will not need any changes in Makefile.

Comment 1 Anand Avati 2011-09-07 14:48:55 UTC
CHANGE: http://review.gluster.com/341 (Earlier:) merged in master by Anand Avati (avati)

Comment 2 Amar Tumballi 2011-09-07 15:09:41 UTC
First step is done. Please go through the commit msg of the patch :


Earlier:
step 1: copy the existing <xdr>.x files to /tmp
step 2: generate '.[ch]' files using 'rpcgen <xdr>.x'
step 3: check diff with the to the existing files, add only your part
        of changes back to the original file. (ignore other changes).
step 4: there is another file to write wrapper functions to convert
        structures to/from XDR buffers, update it with your new structure.
step 5: use these wrapper functions in the newly written procedures.
step 6: commit :-|

Now:
step 1: update (mostly adding only) the <xdr>.x file
step 2: run '<path-to-src>/extras/generate-xdr-files.sh <xdr>.x' command
step 3: implement rpc procedure to handle the request/response.
step 4: commit :-)

---

In the next step, we should be removing the .[ch] files also from repository and build it on the fly on the machine where it is compiled. But that is next step, for which I will open another bug.