πΊοΈ 1. The Superblock: The Master Map
The superblock contains high-level information about the entire filesystem. It acts as a master controller that knows the "big picture," such as the total size of the filesystem and how much space is currently being used.
πͺͺ 2. The Inode: The Fileβs Identity Card
An inode (index node) is a record that stores almost everything about a specific file, such as who owns it and what its permissions are.
Crucial Fact: The inode does not store the file's name.
Instead, it stores the numbers of the data blocks where the file's content is physically located on the disk.
In a very real sense, the inode is the file, as it holds all the vital metadata and location data.
π 3. The Directory Entry: The Name Link
Because the inode doesn't know the file's name, the system uses a directory entry to link a human-readable filename to a specific inode number.
- A directory is essentially a simple list or "phonebook" where each entry consists of a filename paired with its inode number.
π½ 4. Data Blocks: The Storage Units
Data blocks are the physical parts of the disk where the actual content of your file is kept.
When you open a document, the computer:
- Looks up the inode
- Finds the block numbers listed inside it
- Reads those specific data blocks
to show you your information.
π 5. Indirect Blocks: The Overflow List
An inode only has a fixed amount of space, which means it can only list a few data block numbers directly.
If a file is very large and needs more data blocks than the inode can hold, the system creates indirect blocks.
These are specialized blocks that don't hold your file's data, but instead hold a longer list of pointers to even more data blocks.
To find the contents of a massive file, the computer first goes to the inode, then to the indirect block, and finally to the actual data blocks.
Top comments (0)