[PATCH v3] mtd: Verify written data in paranoid mode
Richard Weinberger
richard at nod.at
Mon May 12 08:57:54 PDT 2025
----- Ursprüngliche Mail -----
> Von: "Csókás Bence" <csokas.bence at prolan.hu>
>>> UBI offers this already, there is a write self-check as part of the io
>>> checks that can be enabled
>>> via debugfs per UBI device.
>>> So for troubleshooting this should be good enough.
>>> There is room for improvement, though. Currently it uses vmalloc().
>>
>> UBI is full of uncovered resources :-)
>
> For sure. Plus, even though we use UBI + UBIFS, that may not necessarily
> be the case for others. Maybe someone uses mtdblock + some
> "conventional" FS (ext*, f2fs etc.). Or maybe they use JFFS. Or maybe no
> FS at all. We should still allow userspace or higher FS layers to be
> notified of the problem.
Nobody sane would every use a regular block based filesystem in rw mode
on-top of mtdblock. Especially if you care about your data.
JFFS2 has CONFIG_JFFS2_FS_WBUF_VERIFY.
AFAIK, this origins form the old and dark age of flashes where everything
was wonky and no good test tooling existed.
Long story short, I'm not convinced by this patch set.
No ack form my side.
At least it should be configurable per device and not being a global
config option. If Michael or Miquel like it, I'll not block this decision.
Thanks,
//richard
More information about the linux-mtd
mailing list