On Mon, Jul 01, 2013 at 05:15:21PM +0200, Felipe Monteiro de Carvalho wrote: > On Wed, Jun 12, 2013 at 3:52 PM, Theodore Ts'o <tytso@xxxxxxx> wrote: > > The ext4_extent_tail is not used in i_blocks[]. There will be up to 4 > > ext4_extent structures, or ext4_extent_idx structures, depending on > > the depth of the tree. The ext4_extent_idx structures are used for > > the interior inodes of the tree. The ext4_extent structures are used > > for the leaf nodes of the tree. The ext4_extent_tail is used in > > extent tree blocks so we can checksum the metadata if the > > metadata_csum feature is enabled. The entire inode is checksummed, so > > we don't need the ext4_extent_tail in i_blocks[]. > > Hello, > > thanks, this part I understood fairly well, but what if eh_entries is > 8, for example .... where are the other 4 structures? For the root node which is located in the inode, that would be illegal. There is only room for four entries in the root node. If an inode needs more extents than that, then we have to have an extent leaf tree block in an external 4k block and the root inode will point to up to four extent tree leaf blocks. If there are more than four leaf blocks, then the tree would have to grow in depth again, and the root node would contain a pointer to up to four index blocks, and each index node block can point to up to 340 leaf tree blocks. (Assuming a 4k block size) Basically, this is a standard tree data structure. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html