Coda File System

vcrcommon.{rpc2,h} and cml.{rpc2,h}

From: LEE, Yui-wah <>
Date: Tue, 12 Oct 1999 17:02:21 +0800 (CST)

Sorry, I still have some questions and comments on this subject.

Clement wrote:
> I ask this question, because once I had the following problem.  In
> coda-src/vicedep, I had an old vcrcommon.h, which never got updated
> into include/ even though I ran "make clean".  The vcrcommon.h is one
> of the $(HEADERS) files.  I have to manually removed the file
> eventually.

Jan wrote:
> That is intentional, this file used to be generated from vcrcommon.rpc2,
> but there were some problems. Can't really remember what they were
> (dependencies?), but we decided to `pre-generate' vcrcommon.h and put it
> in the HEADERS instead of the RP2HEADERS.
> The only problem we have had was when extra types for write-back caching
> were added, they were only added to the .h file and not the .rpc2
> version causing build problems when the timestamps were off. 

and later,
> I believe that the problem with vcrcommon.rpc2 was that it only
> generates headers, and therefore these expansions,
>  RP2CLOBJ = $(notdir ${RP2FILES:.rpc2=.client.o})
>  RP2SROBJ = $(notdir ${RP2FILES:.rpc2=.server.o})
> would add vcrcommon.client.o to RP2CLOBJS, etc. But as there is no
> vcrcommon.client.c file, this results in a build error.

But then which one of the two is the master copy ? vcrcommon.h or
vcrcommon.rpc2?  I just test-generated a new vcrcommon.h from
vcrcommon.rpc2 of Coda 5.3.1, the pre-generated vcrcommon.h is
different to the newly generated.  Most notably:

--- vcrcommon.h.pre_gen Tue Oct 12 16:48:12 1999
+++ vcrcommon.h Tue Oct 12 16:48:58 1999
-typedef enum{ NoPermit=0, PermitSet=1 } PermitStatus;

(some other minor differences are omitted.)

Also, clement asked:
> Should we put cml.rpc2 be in $(RP2FILES), or cml.h in $(HEADERS) ?
> Coda-5.3.1 is using the latter form, but I think the former form is
> more appropriate.
> (in coda-src/vicedep/, coda-5.3.1)
> ----------------------------------------------------------------------
> RP2FILES = callback.rpc2 res.rpc2 vice.rpc2 volutil.rpc2 \
>               voldump.rpc2 mond.rpc2 adsrv.rpc2 admon.rpc2 writeback.rpc2
> ...
> RP2HEADERS  = $(notdir ${RP2FILES:.rpc2=.h}) cml.h
> HEADERS = venusioctl.h srv.h operations.h recov_vollog.h vcrcommon.h
> ----------------------------------------------------------------------
> -- Clement

Jan wrote:
> But the generated cml.client.c, cml.server.c, and cml.multi.c are not
> used anywhere so it is not useful to compile and link them. Only the
> cml.h file is used by the CML packing and unpacking routines in venus
> and vice to construct the log that is sent during reintegration.

Maybe we should document the reason in the  If Clement
asked, then someone else will probably ask too (this is called the
"locality of questions" ^_^

-- Clement

Yui-wah LEE (Clement)                         |    Tel: (852)-26098412
Department of Computer Science & Engineering, | Mobile: (852)-98421024 
The Chinese University of Hong Kong   | Real-time Msg.: 41792200 (ICQ)
WWW:     | Email:
Received on 1999-10-12 05:04:01