LWN.net Logo

A NILFS2 score card

A NILFS2 score card

Posted Nov 8, 2012 21:38 UTC (Thu) by Russ.Dill@gmail.com (subscriber, #52805)
In reply to: A NILFS2 score card by etienne
Parent article: A NILFS2 score card

While both NOR flash and NAND flash have this property, it isn't nearly as simple as you'd think.

For NAND flash, especially MLC NAND flash, each page is broken up into subpages that can be written individual, but must be written in order, and only a certain number of writes are allowed.

For both NAND and NOR, just because something looks like 0xFF doesn't mean its actually 0xFF, it could be an incomplete erase, and it may not read as 0xFF the next time.

Also, since we are talking log structured file systems, you don't allocate space for files anyway, you allocate space for writes. In the case of a file hole, you just don't allocate space.

The more I think about this, the less sense it makes, 0x00's don't appear in a file with a hole because 0x00's exist on the disk anyway...


(Log in to post comments)

A NILFS2 score card

Posted Nov 9, 2012 9:51 UTC (Fri) by etienne (subscriber, #25256) [Link]

> since we are talking log structured file systems, you don't allocate space for files anyway, you allocate space for writes.

I have never gone into log structured file systems, I do not know how they handle the pattern people use to create contiguous files on standard filesystems (write a byte at beginning of the file, write a byte at the end of the file of known size, flush the file). Even the best filesystems cannot guess the final size of the file without hint, and even with delayed allocation at some point something has to be written to the disk.

> In the case of a file hole, you just don't allocate space.

But holes can appear at a random position, and usually the filesystem will not allocate blocks in a file hole on the parts aligned to sector sizes, so the filesystem has to write the default value on parts which are not aligned.
Then, the user usually begin to fill the hole that he has just created, so the FLASH driver has just zeroed the FLASH and is forced to erase it again.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds