<s>
Journalling	O
Flash	O
File	O
System	O
version	O
2	O
or	O
JFFS2	B-Application
is	O
a	O
log-structured	B-Application
file	I-Application
system	I-Application
for	O
use	O
with	O
flash	B-Device
memory	I-Device
devices	O
.	O
</s>
<s>
It	O
is	O
the	O
successor	O
to	O
JFFS	B-Application
.	O
</s>
<s>
JFFS2	B-Application
has	O
been	O
included	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
since	O
September	O
23	O
,	O
2001	O
,	O
when	O
it	O
was	O
merged	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
mainline	O
as	O
part	O
of	O
the	O
kernel	B-Operating_System
version	O
2.4.10	O
release	O
.	O
</s>
<s>
JFFS2	B-Application
is	O
also	O
available	O
for	O
a	O
few	O
bootloaders	B-Application
,	O
like	O
Das	B-Language
U-Boot	I-Language
,	O
Open	B-Architecture
Firmware	I-Architecture
,	O
the	O
eCos	B-Operating_System
RTOS	O
,	O
the	O
RTEMS	B-Operating_System
RTOS	O
,	O
and	O
the	O
RedBoot	B-Application
.	O
</s>
<s>
Most	O
prominent	O
usage	O
of	O
the	O
JFFS2	B-Application
comes	O
from	O
OpenWrt	B-Application
.	O
</s>
<s>
At	O
least	O
three	O
file	O
systems	O
have	O
been	O
developed	O
as	O
JFFS2	B-Application
replacements	O
:	O
LogFS	B-Application
,	O
UBIFS	B-Application
,	O
and	O
YAFFS	B-Application
.	O
</s>
<s>
JFFS2	B-Application
introduced	O
:	O
</s>
<s>
This	O
was	O
not	O
possible	O
in	O
JFFS	B-Application
because	O
of	O
limitations	O
in	O
the	O
on-disk	O
format	O
.	O
</s>
<s>
Four	O
algorithms	O
are	O
available	O
:	O
zlib	B-Language
,	O
rubin	O
,	O
rtime	O
,	O
and	O
lzo	B-Language
.	O
</s>
<s>
JFFS	B-Application
treated	O
the	O
disk	O
as	O
a	O
purely	O
circular	O
log	O
.	O
</s>
<s>
The	O
garbage	B-General_Concept
collection	I-General_Concept
algorithm	O
in	O
JFFS2	B-Application
makes	O
this	O
mostly	O
unnecessary	O
.	O
</s>
<s>
As	O
with	O
JFFS	B-Application
,	O
changes	O
to	O
files	O
and	O
directories	O
are	O
"	O
logged	O
"	O
to	O
flash	O
in	O
nodes	O
,	O
of	O
which	O
there	O
are	O
two	O
types	O
:	O
</s>
<s>
inodes	B-Application
:	O
a	O
header	O
with	O
file	O
metadata	O
,	O
followed	O
by	O
a	O
payload	O
of	O
file	O
data	O
(	O
if	O
any	O
)	O
.	O
</s>
<s>
dirent	O
nodes	O
:	O
directory	O
entries	O
each	O
holding	O
a	O
name	O
and	O
an	O
inode	B-Application
number	I-Application
.	O
</s>
<s>
Hard	O
links	O
are	O
represented	O
as	O
different	O
names	O
with	O
the	O
same	O
inode	B-Application
number	I-Application
.	O
</s>
<s>
The	O
special	O
inode	B-Application
number	I-Application
0	O
represents	O
an	O
unlink	O
.	O
</s>
<s>
As	O
with	O
JFFS	B-Application
,	O
nodes	O
start	O
out	O
as	O
valid	O
when	O
they	O
are	O
created	O
,	O
and	O
become	O
obsolete	O
when	O
a	O
newer	O
version	O
has	O
been	O
created	O
elsewhere	O
.	O
</s>
<s>
Unlike	O
JFFS	B-Application
,	O
however	O
,	O
there	O
is	O
no	O
circular	O
log	O
.	O
</s>
<s>
Instead	O
,	O
JFFS2	B-Application
deals	O
in	O
blocks	O
,	O
a	O
unit	O
the	O
same	O
size	O
as	O
the	O
erase	O
segment	O
of	O
the	O
flash	O
medium	O
.	O
</s>
<s>
The	O
garbage	B-General_Concept
collector	I-General_Concept
runs	O
in	O
the	O
background	O
,	O
turning	O
dirty	O
blocks	O
into	O
free	O
blocks	O
.	O
</s>
<s>
To	O
make	O
wear-levelling	B-Application
more	O
even	O
and	O
prevent	O
erasures	O
from	O
being	O
too	O
concentrated	O
on	O
mostly-static	O
file	O
systems	O
,	O
the	O
garbage	B-General_Concept
collector	I-General_Concept
will	O
occasionally	O
also	O
consume	O
clean	O
blocks	O
.	O
</s>
<s>
Due	O
to	O
its	O
log-structured	O
design	O
,	O
JFFS2	B-Application
's	O
disadvantages	O
include	O
the	O
following	O
:	O
</s>
<s>
All	O
nodes	O
must	O
still	O
be	O
scanned	O
at	O
mount	B-Application
time	O
.	O
</s>
<s>
To	O
overcome	O
this	O
issue	O
,	O
the	O
Erase	O
Block	O
Summary	O
(	O
EBS	O
)	O
was	O
introduced	O
in	O
version	O
2.6.15	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
