[PATCH] mtd: add MEMREAD ioctl

Michał Kępień kernel at kempniu.pl
Thu Sep 30 06:54:07 PDT 2021


> > > > > I remember discussing search a new READ ioctl with Sascha Hauer a few
> > > > > years back, but I can't find the discussion...    
> > > 
> > > I think this is the thread in question:
> > > 
> > >     https://www.infradead.org/pipermail/linux-mtd/2016-April/thread.html#67085
> > > 
> > > In fact, it looks like Boris beat me to preparing a draft patch adding a
> > > MEMREAD ioctl by some five years:
> > > 
> > >     https://www.infradead.org/pipermail/linux-mtd/2016-April/067187.html  
> > 
> > Exactly the one I was referring to. Note that this patch still contains
> > the unbounded malloc which I think is worth fixing, but other than
> > that and the addition of ECC stats, it looks pretty similar to yours.

Right, thanks.

> > > I guess the big question from my perspective is: should I revive Boris'
> > > original effort on the MEMREAD ioctl (which returns more detailed
> > > bitflip stats in the structure passed by user space) or would that be a
> > > waste of time because the subsystem will be switched over wholesale to a
> > > new way of doing I/O (mtd_io_op) in the foreseeable future and therefore
> > > exposing yet another ioctl to user space today would be frowned upon?
> > >   
> > 
> > That's not my call to make, but I think those 2 things are orthogonal
> > and can be addressed separately.
> 
> Agreed.

Thank you both - it sounds like I should start working on a v2 that will
make the new MEMREAD ioctl return more detailed ECC statistics to user
space.

Boris, I think a Suggested-by tag crediting you is in order for both the
unbounded malloc issue and the MEMREAD ioctl, but submitting-patches.rst
says I should not add this tag without your permission.  So, are you
okay with me adding it?

Miquel, as for the unbounded malloc issue, should I address this in a
separate (preliminary) patch or rather submit a two-patch v2 series
(unbounded malloc fix + new MEMREAD ioctl)?

-- 
Best regards,
Michał Kępień



More information about the linux-mtd mailing list