Posted Nov 7, 2012 14:43 UTC (Wed) by mirabilos (subscriber, #84359)
[Link]
Ah, is that so? And for any and all Flash types?
I wonder why the hardware doesn’t flip that then…
In that case, storing data NOT’d might make sense,
though no idea about the performance impact.
A NILFS2 score card
Posted Nov 7, 2012 16:47 UTC (Wed) by cmorgan (guest, #71980)
[Link]
I'm not sure it matters what the erased state is as long as the "erased" value is defined and handled correctly.
Also keep in mind that some flash chips may not support flipping single bits inside of bytes or flipping individual bytes etc and warn against it. I've personally done this and it worked (and we had error correction) but for some reason the manufacturer said specifically not to. Maybe this is a serial flash only issue though. Can't say I've had that much experience with a range of flash parts.
A NILFS2 score card
Posted Nov 8, 2012 16:30 UTC (Thu) by mirabilos (subscriber, #84359)
[Link]
I was thinking of hardware engineers putting little NOT transistors on the D-bus of the flash chip, before attaching it to the system bus, so that a 0x00 on the system bus would be reas as 0xFF by the chip viceque versa. That would’ve been useful in this case.
But alas, if it isn’t… someone has to deal with it. (And the other comments suggest that the state may not be the same everywhere, so blindly XORing with FFh in the kernel will also not be a solution.)
A NILFS2 score card
Posted Nov 9, 2012 18:09 UTC (Fri) by BenHutchings (subscriber, #37955)
[Link]
This is true for NOR flash, which normally has a direct mapping of bits to cells and supports byte writes (or maybe even bit writes). It's not true for NAND flash, even if it's SLC: the individual cells are substantially less reliable so it requires ECC and block writes. A block that has been erased most likely won't have valid contents at all.