|
An Extent is a small structure which points to a variable number of adjacent blocks on the disk. Extents are used to keep track of data stored in files. For each fragment of a file there is an Extent which points to that fragment. If the fragment is larger than a certain size then multiple Extents are needed to keep track of the fragment. Extents must of course have a block number, which is the number of the first block of the region of adjacent blocks this Extent keeps track of. Extents also have a field with the size in blocks of their region and an Extent has fields containing the first block number of the next Extent and the first block number of the previous Extent. Extents are stored by their block number in a B-Tree (the Extent B-Tree). Because B-Tree's are ordered you can easily find an Extent if you know its block number. Extents have two fields which contain the first block number of the previous and the next Extent. Using the B-Tree, these block numbers can be looked up to find out where the next or previous Extent is stored. You could say that Extents are stored in a double linked list (as indicated by the yellow arrows). B-Tree's are stored in BNodeContainer blocks. Although the B-Tree system can keep track of multiple B-Trees (by simply having multiple Root BNodeContainer blocks), there currently only is an Extent B-Tree. Extents are ideal for keeping track of data stored in files. All you need to know is the first block of data of a file, and you can use the B-Tree to locate the Extent which belongs to it. Since the Extents are linked you can easily locate all fragments belonging to a file.
|
All rights reserved.
|