User:HughesJohn/Sandbox

=VNODE=

A  is a data structure introduced by the SunOS Virtual file system to represent a file in an actual file system. It provides an abstract interface to the underlying file system, allowing a clean interface between the kernel and different file systems.

The name vnode is suggested by "virtual inode", where an inode is the data structure used by UFS to hold metadata about the file on disk.

The vnode interface is an example of object oriented programming techniques being used to achieve polymorphism. Each vnode contains a pointer to a structure which is itself a list of pointers to functions that implement the various file system operations on that vnode, for example as part of the process of removing a file the kernel would make the call:

vp->v_op->vn_remove (vp, filename, credentials);

Where  is a pointer to the vnode for the directory containing the file.

The actual function pointed to by  depends on the file system holding the file, it might be the function for removing a file from a UFS files system, or the function for sending a RPC message to another machine to remove a file on NFS filesystem.

The calling code does not need to know which underlying file system is being used, they all implement the same list of operations.

Refrerences
Criticism: should replace uppercase words by bold as in publication style. Maybe need "lang"'s for each of the stropping regimes (POINT, UPPER, RES).

Criticism: Does nothing with non-builtin bold words (user modes, operators).

Criticism: Doesn't recognise multi-line comment. How does C do that?

Criticism: Doesn't know about formats.