[PATCH] mtd/block2mtd: don't poke into block layer internals
hch
hch at lst.de
Thu Oct 14 23:28:09 PDT 2021
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...
Hmm. Doing the right first is quite a bit of overhead, especially as
unlike the direct page cache access we can't just poke into the page
without copying it.
> I think we can actually weaken that check to allow regular files too.
> Then one can directly use a file as backend. These days people use block2mtd
> sometimes with a file backend via a loop device.
Yes, a file backend will work just fine.
> P.s: While reading this driver I found another issue. There is no way to remove an MTD at runtime.
> Miquel, what do you think? Shall we limit block2mtd to one MTD?
> The current interface via module parameters is horrible.
---end quoted text---
More information about the linux-mtd
mailing list