(Translated by https://www.hiragana.jp/)
HTree - Wikipedia

HTree

This is an old revision of this page, as edited by Frap (talk | contribs) at 03:00, 29 July 2013 (Added text). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Template:Distinguish2 An HTree is a specialized tree data structure for directory indexing, similar to a B-tree. They are constant depth of either one or two levels, have a high fanout factor, use a hash of the filename, and do not require balancing.[1] The HTree algorithm is distinguished from standard BTree methods by its treatment of hash collisions, which may overflow across multiple leaf and index blocks. Htree indexes are used in the Ext3 and Ext4 Linux filesystems, and were incorporated into the Linux kernel around 2.5.40.[2] HTree indexing improved the scalability of Linux Ext2 based filesystems from a practical limit of a few thousand files, into the range of tens of millions of files per directory.

PHTree is a derivation intended as a successor.[3]

History

The Htree index data structure and algorithm were developed by Daniel Phillips in 2000 and implemented for the Ext2 filesystem in February 2001. A port to the Ext3 filesystem by Christopher Li and Andrew Morton in 2002 during the 2.5 kernel series added journal based crash consistency. With minor improvements, HTree continues to be used in Ext4 in the Linux 3.x.x kernel series.

User

  • ext2 Htree indexes were originally developed for ext2 but the patch never made it to the official branch. The dir_index feature can be enabled when creating an ext2 filesystem, but the ext2 code won't act on it.
  • ext3 Htree indexes are available in ext3 when the dir_index feature is enabled.
  • ext4 Htree indexes are turned on by default in ext4. This feature is implemented in Linux kernel 2.6.23. The Htree is also used to index the files extents when the flow over 4 extents in the inode.

See also

References

  1. ^ Mingming Cao. "Directory indexing". Features found in Linux 2.6.
  2. ^ tytso@mit.edu. "Add ext3 indexed directory (htree) support".
  3. ^ http://phunq.net/pipermail/tux3/2013-January/000026.html