next up previous
Next: Supporting backups Up: Who wants another filesystem? Previous: Supporting RAID

Supporting NFS

The NFS file access protocol (prior to version 4 at least) placed two primary requirements on a filesystem (beyond obvious things required by the POSIX interface). These relate to filehandles and synchronous writes.

The usage of 'filehandles' in NFS requires that the filesystem be able to present an small fixed length identifier for every file that is universally unique over all time. While the file exists, it must always have the same file handle, no other file may ever have the same filehandle, and the filehandle must be enough to find the file.

Combining the inode number with a per-inode 'generation' number that is different each time the inode number is reused is a typical and adequate approach to this need, and is shared by many filesystems, including LaFS.

The other need, for synchronous writes, is more interesting. The specification for NFS requires that every change is stored safely on stable storage before the response is sent. This means that writing to stable storage must have very low latency. NFS version 3 relaxes this requirement for file data, but it still holds for directory updates (create, unlink, etc) so good behavior in the face of synchronous writes is still needed.

The log-structured filesystem helps here by allowing 1 or several updates to be committed safely in a single write to a contiguous section of the device. This greatly reduces the number of costly seeks that are required

While this feature is helped by the log structuring, it is not unique to a LFS. Filesystems that can do full data journaling, such as ext3 and more recently reiserfs, can achieve similar low latencies.

When an NVRAM device is included in a LaFS as described in the section on volume management, we get even better write latency and can provide even better NFS performance.


next up previous
Next: Supporting backups Up: Who wants another filesystem? Previous: Supporting RAID
Neil Brown 2003-02-06