ARM: configs: at91: Remove MTD_BLOCK and use MTD_UBI_BLOCK for read only block FS
authorTudor Ambarus <tudor.ambarus@microchip.com>
Wed, 20 Apr 2022 13:47:38 +0000 (16:47 +0300)
committerNicolas Ferre <nicolas.ferre@microchip.com>
Fri, 6 May 2022 07:41:56 +0000 (09:41 +0200)
commit5c6f84728db77367df696ebb63a8f6430b3c9708
tree457bc4aec4975cedcb36fcd49a6986e12dc4f4b2
parent3123109284176b1532874591f7c81f3837bbdc17
ARM: configs: at91: Remove MTD_BLOCK and use MTD_UBI_BLOCK for read only block FS

Using mtdblock on raw flashes is generally a bad idea as it lacks
wear-leveling, bad block handling or power-cut management.
What happens when you use mtdblock and you change any sector of your
mtdblockX device, is that it reads the whole corresponding eraseblock into
the memory, erases the eraseblock, changes the sector in RAM, and writes
the whole eraseblock back. If you have a power failure when the eraseblock
is being erased, you lose all the block device sectors in it. The flash
will likely decay soon because the eraseblocks will wear out.

Remove this archaic tool as its use case should rather be only for debug
purposes. This means that write-capable block file systems like ext2,
ext3, FAT, etc. will no longer be addressed with at91 defconfigs. For
read only block filesystems like SquashFS, use MTD_UBI_BLOCK instead and
benefit of UBI's bit-flip handling and wear-levelling.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220420134740.193563-1-tudor.ambarus@microchip.com
arch/arm/configs/at91_dt_defconfig
arch/arm/configs/sama5_defconfig