next up previous contents
Next: 8.5.2 Path Traversal Up: 8.5 How It All Previous: 8.5 How It All

   
8.5.1 Mounting

Consider first the two file systems X and Y, depicted in Figure fig-vnode-fs-xyz. In this figure, the numbers near the node names represent the file/inode/vnode numbers of that file or directory within that particular file system. For example ``X5'' refers to the vnode of the directory /usr/local on file system X.


  
Figure: File System Z as Y mounted on X

Figure: File System Z as Y mounted on X


\epsfig{file=figures/fs-x.eps} \epsfig{file=figures/fs-y.eps} \epsfig{file=figures/fs-y-on-x.eps}




6.4in


\epsfig{file=figures/fs-x.eps} \epsfig{file=figures/fs-y.eps} \epsfig{file=figures/fs-y-on-x.eps}


Let's also assume that X is a UFS (local) file system, and that Y is the /usr file system available on a remote file server named ``titan.'' We wish to perform the following NFS mount action: mount titan:/usr /usr.

The in-kernel actions that proceed, assuming that all export and mount permissions are successful, are the following:

1.
A new vfs is created and is passed on to nfs_mount.

2.
nfs_mount fills in the new vfs structure with the vfs operations structure for NFS, and sets the v_vfsmountedhere of the vnode X2 to this new vfs.

3.
nfs_mount also creates a new vnode to serve as the root vnode of the Y file system as mounted on X. It stores this vnode in the v_data field of the new vfs structure.


next up previous contents
Next: 8.5.2 Path Traversal Up: 8.5 How It All Previous: 8.5 How It All
Erez Zadok
1999-12-07