[PATCH v3] mtd/docg3: fixes and cleanups

Mike Dunn mikedunn at newsguy.com
Mon Dec 12 23:16:36 EST 2011


On 12/12/2011 02:03 PM, Robert Jarzmik wrote:
> Artem Bityutskiy <dedekind1 at gmail.com> writes:
>
>> On Fri, 2011-12-09 at 17:13 +0100, Robert Jarzmik wrote:
>> What do you mean by "handle" ? Is the problem that docg3 maintains
>> per-eraseblock erase-counters and you do not know how to use them?
> Yes, exactly, docg3 maintains that counter for each block.
>
> I thought that upper layers (UBI,...) could use both the erase counter and the
> ECC number of flipped bits to select which block to erase next. After a quick
> glance, I don't think they can do it.


The erase counters are surely used by the TrueFFS library.  The diskonchip and
TrueFFS were both developed by M-Sys.  But since it's a unique feature of this
device, it would probably be impractical for ubi or mtd to use them.  I'm
impressed that you discovered them, though.  I had no clue that they existed on
the diskonchip P3.  They are probably on the G4 too.


>> May be it is better to just embrace this function with "#ifdef 0" and add a
>> comment that we can do this but do not have a good use for this?
> Ah yes, I didn't think about that possibility. It's looks better, I'll submit
> another patch with a comment and the #if 0.


Yeah, leave it in, commented out.  But don't submit a patch that produces a
compiler warning!

Thanks,
Mike




More information about the linux-mtd mailing list