File Systems Inodes: - Abstraction - Which Disk Blocks Go With Which File. - Inode: Data Structure For Bookkeeping
File Systems Inodes: - Abstraction - Which Disk Blocks Go With Which File. - Inode: Data Structure For Bookkeeping
Inode Structure
• Direct and Indirect Blocks Inodes
• Advantages:
– Fast access for small files (majority)
– Supports large files
– Supports sparse files
Directories Super Block
• Like a file: List of files and directories • Contains the layout of the Disk
– name – Size of Disk
– inode number – Number of Inodes
• Can read it like a file – Number of Data Blocks
• Always has at least 2 entries: – Where inodes start, where data blocks start,
etc….
– “.” current directory
– “..” parent directory
Disk Layout
Super blocks (cont.)
• typedef struct {
Boot Block (Our OS == entire image)
• char signature[SIGN_SIZE]; /* Signature */
Super Block
• int size; /* Size of file system in blocks */
• int root_inode; /* Inode no. of root directory */ Inode Blocks
• int inode_start; /* First block for inodes */ Allocation Bitmap
• int inode_blocks; /* Number of inode blocks */ Allocation data Blocks