Coda File System

Next Previous Contents

8. Threads

Threads in Venus come in about a dozen of different types. Basic threads handlnig vfs requests are object of type vproc; see vproc.h. These classes export a very important interface encapsulating the type of messages and operation dispatched to threads during operation. Among the exported operations are the vfs operations, which are spelled out in vproc_vfscalls.cc.

Pioctl calls are handled by routines defined in vproc_pioctl.cc. This file is effectively one large case statement to distinguish among opcodes.

vproc_pathname.cc handles the lookup of names in directories and fills in a vnode as output. It also contains a routine translating fids to full pathnames.

Typically the routines in these files call methods of the FSDB to find the appropiate objects and manipulate their data.

Operations such as resolution and re-integration are handled by special daemon threads.

A derived class from the vprocs are the worker threads (worker.h). These threads handle the messages delivered to Venus. Their interface is defined in worker.cc which describes the methods for handling messages. This file also contains the operations for mounting /coda. A message queue is maintained. Messages are dispatched to a pool of threads.

daemon threads for each subsystem (volume, comm, rvm, etc.)


Next Previous Contents