Next | Internals of ext2fs | 13 |
Each time you mount a filesystem, the kernel builds a struct super_block
This struct contains a method table of superblock operations
The structs are linked into a list
mount's job is to build this struct and put it into the list
Typical mount call:
mount("/dev/hdb2", "/home", "ext2", ...);
The code for mount is in super.c:
long do_mount(char * dev_name, char * dir_name, char *type_page, unsigned long flags, void *data_page) { ... fstype = get_fs_type(type_page); if (!fstype) return -ENODEV; ... if (...) ... else if (fstype->fs_flags & FS_REQUIRES_DEV) sb = get_sb_bdev(fstype, dev_name, flags, data_page); ... }
get_sb_bdev calls read_super to read in the superblock structure
Next | Copyright © 2001 M. J. Dominus |