Next
Previous
Contents
This section gives brief hints as to desirable features for the
Coda FS Driver at startup and upon shutdown or Venus failures.
Before entering the discussion it is useful to repeat that the Coda
FS Driver maintains the following data:
-
message queues
-
cnodes
-
name cache entries
The name cache entries are entirely private to the driver, so they
can easily be manipulated. The message queues will generally have
clear points of initialization and destruction. The cnodes are much
more delicate. User processes hold reference counts in Coda
filesystems and it can be difficult to clean up the cnodes.
It can expect requests through:
-
the message subsystem
-
the VFS layer
-
pioctl interface
Currently the
pioctl
passes through the VFS for Coda so we
can treat these similarly.
The following requirements should be accomodated:
-
The message queueus should have
open
and
close
routines. On Unix the opening of the character
devices are such routines.
-
Before opening, no messages can be placed.
-
Opening will remove any old messages still pending.
-
Close will notify any sleeping processes that their upcall
cannot be completed.
-
Close will free all memory allocated by the message
queues.
-
At open the namecache shall be initialized to empty state.
-
Before the message queues are open, all VFS operations will
fail. Fortunately this can be achieved by making sure than mounting
the Coda filesystem cannot succeed before opening.
-
After closing of the queues, no VFS operations can succeed.
Here one needs to be careful, since a few operations (lookup,
read/write, readdir) can proceed without upcalls. These must be
explicitly blocked.
-
Upon closing the namecache shall be flushed and disabled.
-
All memory held by cnodes can be freed without relying on
upcalls.
-
Unmounting the file system can be done without relying on
upcalss.
-
Mounting the Coda filesystem should fail gracefully if Venus
cannot get the
rootfid
or the attributes of the
rootfid
. The latter is best implemented by Venus
fetching these objects before attempting to mount.
NOTE
NetBSD in particular but also Linux have not
implemented the above requirements fully. For smooth operation this
needs to be corrected.
\newpage
Next
Previous
Contents