[RFC PATCH 4/4] UBI: Fastmap: Do not add vol if it already exists

Richard Weinberger richard at nod.at
Tue May 26 02:13:06 PDT 2015


Am 26.05.2015 um 10:53 schrieb Sheng Yong:
> Hi, Richard
> 
> On 5/22/2015 4:19 AM, Richard Weinberger wrote:
>> Am 21.05.2015 um 12:16 schrieb Richard Weinberger:
>>> Am 21.05.2015 um 11:56 schrieb Sheng Yong:
>>>> When writing fastmap, there is no guarantee that two same vol ID are
>>>> written to flash by mistake. Although this unlikely happens, we still
>>>> should check it when attaching.
>>>
>>> Not sure if I understand the error scenario.
>>> How can this happen?
> I didn't hit the case, this was just found by codewalking. After I read
> more code and though about more unclean reboot and ECC scenario, I agree
> with you that there is no way to have two same vol_id saved in different
> slots in ubi->volumes[], unless modify it by hand :( .  Thank you for
> pointing it out.

Okay. :)
Please resend your patch with a proper changelog where you explain
that this issue can only be triggered by manually editing the on-flash
data.

Thanks,
//richard



More information about the linux-mtd mailing list