<s>
An	O
HTree	B-Library
is	O
a	O
specialized	O
tree	B-Application
data	I-Application
structure	I-Application
for	O
directory	O
indexing	O
,	O
similar	O
to	O
a	O
B-tree	B-Architecture
.	O
</s>
<s>
They	O
are	O
constant	O
depth	O
of	O
either	O
one	O
or	O
two	O
levels	O
,	O
have	O
a	O
high	O
fanout	O
factor	O
,	O
use	O
a	O
hash	B-Algorithm
of	O
the	O
filename	B-Device
,	O
and	O
do	O
not	O
require	O
balancing	B-Data_Structure
.	O
</s>
<s>
The	O
HTree	B-Library
algorithm	O
is	O
distinguished	O
from	O
standard	O
B-tree	B-Architecture
methods	O
by	O
its	O
treatment	O
of	O
hash	B-Algorithm
collisions	I-Algorithm
,	O
which	O
may	O
overflow	O
across	O
multiple	O
leaf	O
and	O
index	B-Data_Structure
blocks	O
.	O
</s>
<s>
HTree	B-Library
indexes	O
are	O
used	O
in	O
the	O
ext3	B-Application
and	O
ext4	B-Application
Linux	B-Application
filesystems	B-Application
,	O
and	O
were	O
incorporated	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
around	O
2.5.40	O
.	O
</s>
<s>
HTree	B-Library
indexing	O
improved	O
the	O
scalability	O
of	O
Linux	B-Application
ext2	B-Application
based	O
filesystems	B-Application
from	O
a	O
practical	O
limit	O
of	O
a	O
few	O
thousand	O
files	O
,	O
into	O
the	O
range	O
of	O
tens	O
of	O
millions	O
of	O
files	O
per	O
directory	O
.	O
</s>
<s>
The	O
HTree	B-Library
index	B-Data_Structure
data	O
structure	O
and	O
algorithm	O
were	O
developed	O
by	O
Daniel	O
Phillips	O
in	O
2000	O
and	O
implemented	O
for	O
the	O
ext2	B-Application
filesystem	B-Application
in	O
February	O
2001	O
.	O
</s>
<s>
A	O
port	O
to	O
the	O
ext3	B-Application
filesystem	I-Application
by	O
Christopher	O
Li	O
and	O
Andrew	O
Morton	O
in	O
2002	O
during	O
the	O
2.5	O
kernel	B-Operating_System
series	O
added	O
journal	B-Application
based	O
crash	O
consistency	O
.	O
</s>
<s>
With	O
minor	O
improvements	O
,	O
HTree	B-Library
continues	O
to	O
be	O
used	O
in	O
ext4	B-Application
in	O
the	O
Linux	B-Application
3.x.x	O
kernel	B-Operating_System
series	O
.	O
</s>
<s>
ext2	B-Application
HTree	B-Library
indexes	O
were	O
originally	O
developed	O
for	O
ext2	B-Application
but	O
the	O
patch	O
never	O
made	O
it	O
to	O
the	O
official	O
branch	O
.	O
</s>
<s>
The	O
dir_index	O
feature	O
can	O
be	O
enabled	O
when	O
creating	O
an	O
ext2	B-Application
filesystem	B-Application
,	O
but	O
the	O
ext2	B-Application
code	O
wo	O
n't	O
act	O
on	O
it	O
.	O
</s>
<s>
ext3	B-Application
HTree	B-Library
indexes	O
are	O
available	O
in	O
ext3	B-Application
when	O
the	O
dir_index	O
feature	O
is	O
enabled	O
.	O
</s>
<s>
ext4	B-Application
HTree	B-Library
indexes	O
are	O
turned	O
on	O
by	O
default	O
in	O
ext4	B-Application
.	O
</s>
<s>
HTree	B-Library
indexes	O
is	O
also	O
used	O
for	O
file	B-Application
extents	I-Application
when	O
a	O
file	O
needs	O
more	O
than	O
the	O
4	O
extents	B-Application
stored	O
in	O
the	O
inode	B-Application
.	O
</s>
<s>
The	O
large_dir	O
feature	O
of	O
ext4	B-Application
is	O
implemented	O
in	O
Linux	B-Operating_System
kernel	I-Operating_System
4.13	O
.	O
</s>
<s>
PHTree	O
(	O
Physically	O
stable	O
HTree	B-Library
)	O
is	O
a	O
derivation	O
intended	O
as	O
a	O
successor	O
.	O
</s>
<s>
It	O
fixes	O
all	O
the	O
known	O
issues	O
with	O
HTree	B-Library
except	O
for	O
write	O
multiplication	O
.	O
</s>
<s>
It	O
is	O
used	O
in	O
the	O
Tux3	B-Application
filesystem	B-Application
.	O
</s>
