Re: [Yaffs] yaffs2 and unstable bits

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Ally, Christopher
Date:  
To: Charles Manning, yaffs@lists.aleph1.co.uk
Subject: Re: [Yaffs] yaffs2 and unstable bits
Thanks for your response.

I have also been directed to look at the yaffs-robustness-and-testing document on your website for additional information.

Cheers,
Chris

-----Original Message-----
From: Charles Manning [mailto:cdhmanning@gmail.com]
Sent: Thursday, July 10, 2014 4:32 PM
To:
Cc: Ally, Christopher
Subject: Re: [Yaffs] yaffs2 and unstable bits

On Wednesday 09 July 2014 13:23:16 Ally, Christopher wrote:
> Hi,
>
> I noticed on the UBIFS website they describe a problem with unstable bits.
> The problem is described here:
> http://www.linux-mtd.infradead.org/doc/ubifs.html#L_unstable_bits
>
> Basically, they talk about data instabilities that are caused by power
> cuts while writing or erasing. Obviously, they don't handle these properly.
>
> Does YAFFS2 handle such cases, or does yaffs2 also have an unstable
> bits problem when power is cut while erasing or writing?
>


Providing an adequate answer to such a complex issue in an email is very hard.

Whether or not unstable bits will cause corruptions will depend on many factors including both hardware and software.

There are also various things you can do in hardware to improve the situation.
For example most systems probably have sufficient residual power to power the NAND flash for the few milli seconds required to perform an erasure. If the driver checks the power good signal before erasing or writing then it should be enough to prevent power loss during actual erasure/programming.

Clearly if data is completely destroyed then no file system can recover it.
Only some sort of RAID mechanism can do that. (FWIW, I have dabbled with a raid layer to run over Yaffs).

However, much of the susceptibility will depend on the software. The Yaffs log structuring mechanism makes it far more robust against corruption (NB not all log structures have the same properties).

Yaffs does certain things (eg. not using partial page writing) which reduce the possibility of corruption.

>From my experiences using UBIFS, I was not at all impressed by its robustness to power failure. Even at a file system level (ie. ignoring low-level bit

flips) I have seen UBIFS frequently lose data on various systems. Replacing UBIFS with Yaffs made those problems go away.

Yaffs undergoes frequent power failure testing on simulators and real hardware.

Yaffs also periodically undergoes simulator fuzz testing which randomly trashes bits. While this of course can destroy individual files, this does not destroy the whole file system.

I guess the short answer is that nothing is going to be perfect, but Yaffs is going to be generally robust.

Regards

Charles

________________________________

DISCLAIMER:
This e-mail and any attachments to it may contain confidential and proprietary material and is solely for the use of the intended recipient. Any review, use, disclosure, distribution or copying of this transmittal is prohibited except by or on behalf of the intended recipient. If you have received this transmittal in error, please notify the sender and destroy this e-mail and any attachments and all copies, whether electronic or printed.