Extending File Systems Using Stackable Templates

Erez Zadok, Ion Badulescu, Alex Shender

Proceedings of the 1999 USENIX Annual Technical Conference, Monterey, CA, June 6-9, 1999, pp. 57-70


Extending file system functionality is not a new idea, but a desirable one nonetheless[6, 14, 18]. In the several years since stackable file systems were first proposed, only a handful are in use[12, 19]. Impediments to writing new file systems include the complexity of operating systems, the difficulty of writing kernel-based code, the lack of a true stackable vnode interface[14], and the challenges of porting one file system to another operating system. We advocate writing new stackable file systems as ker- nel modules. As a starting point, we propose a portable, stackable template file system we call Wrapfs (wrapper file system). Wrapfs is a canonical, minimal stackable file sys- tem that can be used as a pattern across a wide range of operating systems and file systems. Given Wrapfs, devel- opers can add or modify only that which is necessary to achieve the desired functionality. Wrapfs takes care of the rest, and frees developers from the details of operating sys- tems. Wrapfs templates exist for several common operat- ing systems (Solaris, Linux, and FreeBSD), thus alleviating portability concerns. Wrapfs can be ported to any operating system with a vnode interface that provides a private data pointer for each data structure used in the interface. The overhead imposed by Wrapfs is only 5–7%. This paper describes the design and implementation of Wrapfs, explores portability issues, and shows how the im- plementation was achieved without changing client file sys- tems or operating systems. We discuss several examples of file systems written using Wrapfs.



Columbia University Department of Computer Science