Bug 765220 - (GLUSTER-3488) the *-xdr.[ch] should always be populated by 'rpcgen' only
the *-xdr.[ch] should always be populated by 'rpcgen' only
Product: GlusterFS
Classification: Community
Component: protocol (Show other bugs)
x86_64 Linux
medium Severity low
: ---
: ---
Assigned To: Amar Tumballi
Depends On:
  Show dependency treegraph
Reported: 2011-08-29 01:51 EDT by Amar Tumballi
Modified: 2013-12-18 19:06 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions: master
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Amar Tumballi 2011-08-29 01:51:56 EDT
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 10:48:55 EDT
CHANGE: http://review.gluster.com/341 (Earlier:) merged in master by Anand Avati (avati@gluster.com)
Comment 2 Amar Tumballi 2011-09-07 11:09:41 EDT
First step is done. Please go through the commit msg of the patch :

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 :-|

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.