Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 211238da6d926d1ca4390483bb29f586 > files > 19

coda-doc-5.2.0-4mdk.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE> The Venus kernel interface: Servicing Coda filesystem calls </TITLE>
 <LINK HREF="kernel-venus-protocol-3.html" REL=next>
 <LINK HREF="kernel-venus-protocol-1.html" REL=previous>
 <LINK HREF="kernel-venus-protocol.html#toc2" REL=contents>
</HEAD>
<BODY>
<A HREF="kernel-venus-protocol-3.html">Next</A>
<A HREF="kernel-venus-protocol-1.html">Previous</A>
<A HREF="kernel-venus-protocol.html#toc2">Contents</A>
<HR>
<H2><A NAME="s2">2. Servicing Coda filesystem calls </A></H2>

<P> The service of a
request for a Coda file system service originates in a process <B>P</B>
which accessing a Coda file. It makes a system call which traps to the
OS kernel. Examples of such calls trapping to the kernel are <EM>read,
write, open, close, create, mkdir, rmdir, chmod</EM> in a Unix
context.  Similar calls exist in the Win32 environment, and are named
<EM>CreateFile, </EM>.
<P>Generally the operating system handles the request in a virtual
filesystem (VFS) layer, which is named I/O Manager in NT and IFS
manager in Windows 95.  The VFS is responsible for partial processing
of the request and for locating the specific filesystem(s) which will
service parts of the request.  Usually the information in the path
assists in locating the correct FS drivers.  Sometimes after extensive
pre-processing, the VFS starts invoking exported routines in the FS
driver.  This is the point where the FS specific processing of the
request starts, and here the Coda specific kernel code comes into
play.
<P>The FS layer for Coda must expose and implement several interfaces.
First and foremost the VFS must be able to make all necessary calls to
the Coda FS layer, so the Coda FS driver must expose the VFS interface
as applicable in the operating system. These differ very significantly
among operating systems, but share features such as facilities to
read/write and create and remove objects.  The Coda FS layer services
such VFS requests by invoking on or more well defined services
offered by the cache manager Venus.  When the replies from Venus have
come back to the FS driver, servicing of the VFS call continues and
finishes with a reply to the kernels VFS. Finally the VFS layer
returns to the process. 
<P>As a result of this design a basic interface exposed by the FS driver
must allow Venus to manage message traffic.  In particular
Venus must be able to retrieve and place messages and to be notified
of the arrival of a new message. The notification must be through a
mechanism which does not block Venus since Venus must attend to
other tasks even when no messages are waiting or being processed.
<P>
<FIGURE>
<EPS FILE="interfaces">
<CAPTION>
<A NAME="fig_overview"></A> Interfaces of the Coda FS Driver</CAPTION>
</FIGURE>
<P>Furthermore the FS layer provides for a special path of communication
between a user process and Venus, called the pioctl interface. The
pioctl interface is used for Coda specific services, such as
requesting detailed information about the persistent cache managed by
Venus. Here the involvement of the kernel is minimal.  It identifies
the calling process and passes the information on to Venus.  When
Venus replies the response is passed back to the caller in unmodified
form. 
<P>Finally Venus allows the kernel FS driver to cache the results from
certain services.  This is done to avoid excessive context switches
and results in an efficient system.  However, Venus may acquire
information, for example from the network which implies that cached
information must be flushed or replaced. Venus then makes a downcall
to the Coda FS layer to request flushes or updates in the cache.  The
kernel FS driver handles such requests synchronously. 
<P>Among these interfaces the VFS interface and the facility to place,
receive and be notified of messages are platform specific.  We will
not go into the calls exported to the VFS layer but we will state the
requirements of the message exchange mechanism. 
<P>\newpage
<HR>
<A HREF="kernel-venus-protocol-3.html">Next</A>
<A HREF="kernel-venus-protocol-1.html">Previous</A>
<A HREF="kernel-venus-protocol.html#toc2">Contents</A>
</BODY>
</HTML>