Next | Internals of ext2fs | 15 |
ext2_read_super actually reads the superblock data into memory:
struct super_block * ext2_read_super (struct super_block * sb, void * data, int silent) unsigned long logic_sb_block = 1;
... if (!(bh = bread (dev, logic_sb_block, blocksize))) { printk ("EXT2-fs: unable to read superblock\n"); return NULL; } ...
bread here actually reads the disk
(It too is dispatched through a method table for the particular physical device)
dev identifies the device
logic_sb_block is the block number to read---normally 1
Because the superblock is normally the first block on the disk
Next | Copyright © 2001 M. J. Dominus |