Skip to Content
UNIX Filesystems: Evolution, Design, and Implementation
book

UNIX Filesystems: Evolution, Design, and Implementation

by Steve D. Pate
January 2003
Intermediate to advanced content levelIntermediate to advanced
480 pages
13h 22m
English
Wiley
Content preview from UNIX Filesystems: Evolution, Design, and Implementation

images

Developing a Filesystem for the Linux Kernel

Although there have been many programatic examples throughout the book, without seeing how a filesystem works in practice, it is still difficult to appreciate the flow through the kernel in response to the various file- and filesystem-related system calls. It is also difficult to see how the filesystem interfaces with the rest of the kernel and how it manages its own structures internally.

This chapter provides a very simple, but completely functional filesystem for Linux called uxfs. The filesystem is not complete by any means. It provides enough interfaces and features to allow creation of a hierarchical tree structure, creation of regular files, and reading from and writing to regular files. There is a mkfs command and a simple fsdb command. There are several flaws in the filesystem and exercises at the end of the chapter provide the means for readers to experiment, fix the existing flaws, and add new functionality.

The chapter gives the reader all of the tools needed to experiment with a real filesystem. This includes instructions on how to download and compile the Linux kernel source and how to compile and load the filesystem module. There is also detailed information on how to debug and analyze the flow through the kernel and the filesystem through use of printk() statements and the kdb and gdb debuggers. The filesystem layout is ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Design and Implementation of the FreeBSD Operating System, 2nd Edition

Design and Implementation of the FreeBSD Operating System, 2nd Edition

Marshall Kirk McKusick, George V. Neville-Neil, Robert N.M. Watson

Publisher Resources

ISBN: 9780471456759Purchase book