[PATCH] mtd/block2mtd: don't poke into block layer internals

Richard Weinberger richard at nod.at
Fri Oct 22 00:50:29 PDT 2021


----- Ursprüngliche Mail -----
> Von: "hch" <hch at lst.de>
> An: "richard" <richard at nod.at>
> CC: "hch" <hch at lst.de>, "joern" <joern at lazybastard.org>, "Miquel Raynal" <miquel.raynal at bootlin.com>, "Vignesh
> Raghavendra" <vigneshr at ti.com>, "linux-mtd" <linux-mtd at lists.infradead.org>
> Gesendet: Dienstag, 19. Oktober 2021 07:53:09
> Betreff: Re: [PATCH] mtd/block2mtd: don't poke into block layer internals

> On Thu, Oct 14, 2021 at 09:28:19PM +0200, Richard Weinberger wrote:
>> > instead.  Note that this contains a small behavior change in that erase
>> > now unconditionally writes all Fs instead of first scanning for them.
>> 
>> Unless you have a strong opinoin I'd like to keep the scanning.
>> The original use case of block2mtd is using Compact Flash (ATA)
>> as MTD. Some of this devices are super stupid and I fear the 0xFF scanning
>> is here to avoid programming 0xFF bytes into the NAND.
>> Just to be on the safe side...
> 
> I played with keeping the scanning, but it really is a mess.  Shouldn't
> the higher layers (ubi, jffs2, etc) know what has already been erased?

Well, the higher layers are allowed to unconditionally re-erase a block.
I had a short discussion with Miquel, since it is not entirely clear what
the purpose of the read-before-write logic in the erase handler is, let's
keep on the safe side and keep it.

Either it is a performance optimization because erase was super slow on
compact flash cards at the time when Joern created block2mtd.
Or they have been super stupid^Wsimple and writing 0xFF bytes to an erased
region (via mtd_erase) was problematic.
 
> Btw, Joerns address bounces.  Does anyone know if he still wants to
> maintain block2mtd and has a new address or if he should be removed from
> the maintainers list?

I sent a patch to remove him from the maintainers file.
If Joern returns I'll happily revert the patch.

Thanks,
//richard



More information about the linux-mtd mailing list