use case for register_pstore_blk?

Christoph Hellwig hch at lst.de
Wed Oct 7 14:42:58 EDT 2020


The problem with the block code is that it is completely broken.
It uses on-stack structures where it can't, it pokes into internals
of the block device read/write path for absolutely not reason, and
it uses name_to_dev_t which must not be used in new code.

Or in other words: it is a complete piece of crap full of layering
violations that should never have been merged in that form.

It also does not happen to share code with the mtd case.

On Wed, Oct 07, 2020 at 11:40:36AM -0700, Kees Cook wrote:
> On Wed, Oct 07, 2020 at 10:37:15AM +0200, Christoph Hellwig wrote:
> > Looking at this more:  in addition to the block code being totally
> > broken, there is really no point in mtdpstore even using this code.
> > It does nothing but minimal parameter validation to just pass it
> > on to the pstore zone interface.  IMHO writing the mtd code directly
> > to the zone interface makes a whole lot more sense even if we grow
> > a non-broken block backend at some point.  Something like this:
> 
> I really don't like this, sorry. I'm using the pstore/blk bits myself
> already, and I don't want that removed. Additionally I really don't want
> the structures open-coded in the MTD driver. The whole point was to
> encapsulate it. I've spent a lot of time clawing pstore back from the
> brink of open-coded argument and member explosion. :)
> 
> I'm fine to drop the exported register_pstore_blk() API until someone
> actually uses it, but I want to keep pstore/blk itself and the existing
> separation between pstore backing devices and pstore storage logic so
> that configuration happens at the storage level, not the backing device
> level. My intent, for example, is to migrate ramoops to pstore/zone,
> etc, and remove all the ramoops-specific configuration which is common
> to pstore/zone.
> 
> -- 
> Kees Cook
---end quoted text---



More information about the linux-mtd mailing list