Contents xv
Other Clustered Filesystems.......................................................323
The SGI Clustered Filesystem (CXFS)..................................323
The Linux/Sistina Global Filesystem...................................323
Sun Cluster...............................................................................323
Compaq/HP True64 Cluster ................................................. 324
Summary..............................................................................................324
Chapter 14 Developing a Filesystem for the Linux Kernel 325
Designing the New Filesystem .........................................................326
Obtaining the Linux Kernel Source..................................................328
What’s in the Kernel Source Tree ............................................... 329
Configuring the Kernel ................................................................330
Installing and Booting the New Kernel .....................................332
Using GRUB to Handle Bootstrap ........................................333
Booting the New Kernel .........................................................333
Installing Debugging Support ..........................................................334
The printk Approach to Debugging........................................... 334
Using the SGI kdb Debugger ...................................................... 335
Source Level Debugging with gdb.............................................337
Connecting the Host and Target Machines ......................... 337
Downloading the kgdb Patch................................................338
Installing the kgdb-Modified Kernel.................................... 339
gdb and Module Interactions ................................................340
Building the uxfs Filesystem .............................................................341
Creating a uxfs Filesystem.................................................................342
Module Initialization and Deinitialization ..................................... 344
Testing the New Filesystem ........................................................345
Mounting and Unmounting the Filesystem ................................... 346
Scanning for a Uxfs Filesystem ...................................................348
Reading the Root Inode................................................................ 349
Writing the Superblock to Disk................................................... 350
Unmounting the Filesystem ........................................................ 352
Directory Lookups and Pathname Resolution ...............................353
Reading Directory Entries ........................................................... 353
Filename Lookup .......................................................................... 354
Filesystem/Kernel Interactions for Listing Directories...........356
Inode Manipulation............................................................................359
Reading an Inode from Disk .......................................................359
Allocating a New Inode ............................................................... 361
Writing an Inode to Disk .............................................................362
Deleting Inodes ............................................................................. 363
File Creation and Link Management ...............................................365
Creating and Removing Directories ................................................368
File I/O in uxfs....................................................................................370
Reading from a Regular File........................................................371