Thanks Chareles for reply.


As I understood, The main aim of Journaling is using some mechanism in order to recover from fail states of system.(Is it right?) one of its alternative is log-structure that has been implemented in the YAFFS.
I read the document but I could not understand the recovery details. Can everyone help me more about that?

Where the log-structure mechanism has implemented in the YAFFS source code?(Which C file or files contains that?)




From: Charles Manning <cdhmanning@gmail.com>
To: S. K. <s.kr713@yahoo.com>
Sent: Sunday, July 8, 2012 2:42 PM
Subject: Re: [Yaffs] yaffs journaling

On Sunday 08 July 2012 17:06:58 S. K. wrote:
> Good day everybody!
>
>
> I am looking for a document that describes in ditail: how YAFFS do
> journaling?
>
> What is the mechanism of journaling in yaffs?  Could you help me please?

Hello SK

Yaffs is really a log-structured file system and not a journalled file system.
I know I have used the term "journal" in the past but that was applied
loosely and is wrong.

The difference is that a journalling file system has a regular file system
formal and writes a journal of its activities allowing state to be fixed if
an error a occurs. An example is the Linux ext3/ext4 file system. This used
the Linux ext2 formal as regular storage but has a journal to help correct
issues if power is lost.

A log structured file system is different in that there is no regular file
system component. In a log structured file system, the journal is the file
system.

Thus, for the purposes of what you are trying to understand, you may treat the
terms journal and log the same.

The HowYaffsWorks document has an explanation for how data is written into the
flash and how the recovery works.

Regards

Charles