1 preface
The data sources of the article is the source code of system of file of the Ext3 in Linux kernel. To facilitate the reader consults source code, the technical vocabulary of a few keys in the article used the English word that uses in kernel source code, and did not use corresponding Chinese interpreter. (This kind of method is appropriate, still ask reader friends to give advice or comments. Still ask reader friends to give advice or comments..
2 rough descriptions
To Ext2 file system, hard disk partition is differentiated to be each Block above all, every Block on system of an Ext2 file is same size, but to different Ext2 file system, the size of Block can have distinction. Typical Block volume is 1024 Bytes or 4096 Bytes. This size is decided when establishing Ext2 file system, it can be appointed by systematic manager, OK also by file system establish program foundation the size of hard disk partition, choose a more reasonable value automatically. These Blocks are gathered be divided into a few big Block Group. There is how many Block in every Block Group is fixed.
Every Block Group is corresponding a Group Descriptor, these Group Descriptor are gathered be put in the begin part of hard disk partition, follow at the back of of Super Block. Alleged Super Block, tell even below us. There are a few main Block indicators between this Descriptor. The Block guide that says here, show the Block date on hard disk partition is counted namely, for instance, the value of pressing with a finger is 0, we say it is the Block 0 that points to hard disk partition to go up; The value of pressing with a finger is 1023, we say it is the Block 1023 that points to hard disk partition to go up. We notice, the Block computation on partition of a hard disk is from 0 begin, and this computation is divisional to this hard disk for be global property.
In the Group Descriptor of Block Group, among them finger of a Block points to the Block Bitmap of this Block Group, every Bit in Block Bitmap expresses a Block, if this Bit is 0, state the know exactly about sth in this Block is occupied, if Bit is 1, state this Block is disengaged. Attention, itself of this Block Bitmap also as it happens has a Block only so size. Hypothesis Block size is S Bytes, so among Block Bitmap can account 8*S the circumstance of Block (be equal to 8 Bits because of a Byte, and a Bit is corresponding a Block) . This that is to say, a Block Group can have 8*S*S Bytes only at most so big.
Previous12 Next


