• Richard Weinberger's avatar
    ubi: Don't do anchor move within fastmap area · 8596813a
    Richard Weinberger authored
    To make sure that Fastmap can use a PEB within the first 64
    PEBs, UBI moves blocks away from that area.
    It uses regular wear-leveling for that job.
    
    An anchor move can be triggered if no PEB is free in this area
    or because of anticipation. In the latter case it can happen
    that UBI decides to move a block but finds a free PEB
    within the same area.
    This case is in vain an increases only erase counters.
    
    Catch this case and cancel wear-leveling if this happens.
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    8596813a
wl.c 54.9 KB