<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> <TITLE>The Coda File Server: Server RVM layout </TITLE> <LINK HREF="server-5.html" REL=next> <LINK HREF="server-3.html" REL=previous> <LINK HREF="server.html#toc4" REL=contents> </HEAD> <BODY> <A HREF="server-5.html">Next</A> <A HREF="server-3.html">Previous</A> <A HREF="server.html#toc4">Contents</A> <HR> <H2><A NAME="s4">4. Server RVM layout </A></H2> <P>The initial RVM layout of a coda server is simple: <P> <HR> <PRE> boolean_t already_initialized; struct VolHead VolumeList[MAXVOLS]; struct VnodeDiskObject *SmallVnodeFreeList[SMALLFREESIZE]; struct VnodeDiskObject *LargeVnodeFreeList[LARGEFREESIZE]; short SmallVnodeIndex; short LargeVnodeIndex; VolumeId MaxVolId; long Reserved[MAXVOLS]; </PRE> <HR> <P>These fields are accessed through the CAMLIB_REC macro. The SmallVnodeIndex is the index of the highest pointer in the array, pointing to a free vnode. <P>The RVM layout is initialized in coda_init (recovc.cc) which allocates small and large vnodes in RVM for each of the entries in the free vnode list arrays. The vnodes are zeroed out. <P> <H2><A NAME="ss4.1">4.1 Vnodes for volumes </A> </H2> <P> <P>The VolumeData structure has a pointer to the arrays: smallVnodeLists and largeVnodeLists. <P> <H2><A NAME="ss4.2">4.2 Resolution Logs for vnode lists. </A> </H2> <P> <P> <HR> <A HREF="server-5.html">Next</A> <A HREF="server-3.html">Previous</A> <A HREF="server.html#toc4">Contents</A> </BODY> </HTML>