Unix Daemons and Tools



next up previous
Next: Wanda Library Up: Wanda Dumb File System Previous: Name Space

Unix Daemons and Tools

Two MSRPC interfaces were defined for the WDFS service.

File Interface and File Server

The File Interface defines the interface to the file server. This file interface has been defined to be very general and in effect is the interface to a object server.

The present file server interface offers six basic functions, read, write, create, delete, getlen and setlen. Only four operations, read, write, getlen and setlen is directly accessible from the WDFS client. create and delete are reserved operations that is only allowed directly from the directory server wdds. An open operation is considered unnecessary. All access to the file server is done through using a object identifier (PUID). The PUID is regarded to be a opaque field which uniquely identifies a file within a file system and it is not interpreted by the client of the file system. Since the current file server is serving Unix files, the PUID is actually a Unix file name. The current implementation of the file server performs no further access control check on any operation, though future implementations of the file system could also use the PUID as a capability for access control. It will be the responsibility of the directory server (see below), which performs all initial access control checks, to issue the correct PUID.

The file server, wdfs, is implemented as a stateless server and that greatly simplified crash recovery. For performance optimisation, the file server maintains state between operations. Even though the open call is not necessary as a client operation, the file server itself does need to open the Unix file to perform the file operations requested in the remote operation. The Unix file descriptor is cached as an optimisation to avoid reopening of files for each operation. When the number of opened file reaches the maximum number allowed in a Unix process, a Least Recently Used replacement policy is used to flushed out entries from the cache.

When a file is opened and cached, there is always a possibility of the file becoming stale. A timeout mechanism is therefore implemented to close the file after 60 sec of inactivity. A Unix signal SIGHUP can also be sent to the file server process to cause all open files to be closed.

The file MSRPC interface defines a set of error exceptions that might result from the MSRPC file operation. This list of exception (defined in master/iface/msdr/files.x) has been kept to the minimum. They represent only file operation errors and should be usable across all platforms. In this Unix implementation, a mapping is made to convert from the Unix errno onto this set of exception.

Directory Interface and Directory Server

We have provided a skeleton directory service via the Directory Interface. The purpose of the directory server is to allow access control check and name management. The directory interface has been defined in a fairly generic way which allows the directory server to be modified in future to implement any enhancements.

The directory server carries out the access control check on the file assuming the user is wanda. Only if all checks succeed will the directory server return the corresponding PUID, together with information about the particular file, to the calling client.

Just as the file MSRPC interface, the directory MSRPC interface also defines a set of error exceptions that might result from the MSRPC directory operation (defined in master/iface/msdr/files.x. A mapping is made to convert from the Unix errno onto this set of exception.

Two of the files interface procedures create and delete, which performs the creation and deletion of file objects, are reserved for wdds. This will ensure the wdds maintaining a consistent view of the file system.

The wdds interface permits a list of file servers to be returned with each of the PUID returned to the calling client, thus allowing replication of the WDFS. The selection of which actual wdfs to use will be a matter of client function.



next up previous
Next: Wanda Library Up: Wanda Dumb File System Previous: Name Space



Shaw Chuang