why ext4 filesystem choose to use HTree as there extent's tree structure

999 views Asked by At

From ext4 wikipedia introduction, I found the Htree was used in ext4 for both Directory organization and the extents organization.

In directory organization scenario, Hash Table Tree can help to balance and improve search.

but what is the benefit to use Htree in extents organization ?

Tanks for your wisdom :)

1

There are 1 answers

0
lunrox On

i_block field in ext4_inode structure can only contain 60 bytes. Each extent are 12 bytes long. i_block can contain only 4 extents + 1 header. Ext4 uses tree if need to store more than 4 extents.