FYI, I think I understand now our disagreement.Uh, that is really a point, I met UBI implemented in Vxworks ever. Now, you convinced me, we should process fastmap with considering bad images(caused by other implementations). Let's keep this wonky assertion until a better fix.
You assume that old Fastmap PEBs are *guaranteed* to be part of Fastmap's erase list.
That's okay and this is what Linux as of today does.
My point is that we need to be paranoid and check carefully for old Fastmap PEBs
which might be *not* on the erase list.
I saw such issues in the wild. These were causes by old and/or buggy Fastmap
implementations.
Keep in mind that Linux is not the only system that implements UBI (and fastmap).
So let me give the whole situation another thought on how to improve it.
I totally agree with you that currently there is a problem with fm->used_blocks > 1.
I'm just careful (maybe too careful) about changing Fastmap code.
Thanks,
//richard
.