[RFC] mtd: ubi: skip programming unused bits in ubi headers

Richard Weinberger richard at nod.at
Thu Aug 14 04:30:13 PDT 2025


----- Ursprüngliche Mail -----
> Von: "Cheng Ming Lin" <linchengming884 at gmail.com>
>> I have been told that writing 0xFF bytes to NAND should be avoided.
>> This is also why UBI initializes them to 0x00.
> 
> Normally, after a NAND flash block is erased, all bits are in the 0xFF
> state. Programming 0xFF in this case will not actually change the NAND
> cells, as the device can inhibit programming—either by raising the
> bitline voltage or using a self-boosted program inhibit mechanism.
> Therefore, programming 0xFF is a normal and harmless operation for NAND
> flash.

That's the crucial question. Is this true for all NAND chips?
Do avoid larger writes of 0xFF patterns file systems such as UBIFS
also use compression a lot.
At least that's what I have been told when I asked 10+ years ago
how UBI works.

Thanks,
//richard




More information about the linux-mtd mailing list