Is it an atomic operation for writing a page in NAND flash

Ricard Wanderlof ricard.wanderlof at axis.com
Wed Jan 20 05:13:55 EST 2010


On Wed, 20 Jan 2010, Liu Hui wrote:

> Hi guys,
>
> This is a question confused me for a long time. As I know, writing a
> sector for a hard disk is atomic. That is to say, when we are writing
> a sector to hard disk and power failure happen, the sector will be
> written completely or not at all.
>
> For NAND flash, I didn't see the atomic guarantee in any material.
> Could you please tell me if writing a page for NAND flash is atomic?
> This is very important for a transaction based file system.

It is my understanding that if you get a power failure while the nand 
flash chip is writing the page the page could get partly written.

The only way around something like this would be to monitor the power line 
prior to the supply regulator, and not start a write if it can be detected 
that a power failure has occurred and there is not enough power to 
complete the write.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30



More information about the linux-mtd mailing list