public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Sheng Yong <shengyong1@huawei.com>
To: Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [RFC PATCH 4/4] UBI: Fastmap: Do not add vol if it already exists
Date: Tue, 26 May 2015 16:53:05 +0800	[thread overview]
Message-ID: <55643471.7090307@huawei.com> (raw)
In-Reply-To: <555E3DDA.1090405@nod.at>

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.

thanks,
Sheng
> 
> ...thought a bit more about that.
> I think your fix is correct but unless I'm very
> mistaken one can hit the issue only by modifying the fastmap
> by hand.
> 
> Thanks,
> //richard
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 
> 

  reply	other threads:[~2015-05-26  8:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21  9:56 [RFC PATCH 0/4] UBI: Fastmap: Some cleanup and check if a vol exists when attaching Sheng Yong
2015-05-21  9:56 ` [RFC PATCH 1/4] UBI: Fastmap: Use max() to get the larger value Sheng Yong
2015-05-21  9:56 ` [RFC PATCH 2/4] UBI: Fastmap: Remove unnecessary `\' Sheng Yong
2015-05-21  9:56 ` [RFC PATCH 3/4] UBI: Fastmap: Rename variables to make them meaningful Sheng Yong
2015-05-21  9:56 ` [RFC PATCH 4/4] UBI: Fastmap: Do not add vol if it already exists Sheng Yong
2015-05-21 10:16   ` Richard Weinberger
2015-05-21 20:19     ` Richard Weinberger
2015-05-26  8:53       ` Sheng Yong [this message]
2015-05-26  9:13         ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55643471.7090307@huawei.com \
    --to=shengyong1@huawei.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox