Bug 765220 (GLUSTER-3488) - the *-xdr.[ch] should always be populated by 'rpcgen' only
Summary: the *-xdr.[ch] should always be populated by 'rpcgen' only
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-3488
Product: GlusterFS
Classification: Community
Component: protocol
Version: mainline
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: ---
Assignee: Amar Tumballi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-29 05:51 UTC by Amar Tumballi
Modified: 2013-12-19 00:06 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: master
Embargoed:


Attachments (Terms of Use)

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.


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