All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yong <shengyong1@huawei.com>
To: Brian Hill <brian@houston-radar.com>, <linux-mtd@lists.infradead.org>
Subject: Re: ubifs_scan: corrupt empty space
Date: Sat, 27 Jun 2015 17:28:53 +0800	[thread overview]
Message-ID: <558E6CD5.70201@huawei.com> (raw)
In-Reply-To: <558D6251.1070603@houston-radar.com>



On 6/26/2015 10:31 PM, Brian Hill wrote:
> 
> One of our systems using Atmel ARM A5, Micron MT29F4G08ABADAWP -w- kernel 3.17 produced this error, which proved unrecoverable:
> 
> UBIFS error (pid 452): ubifs_scan: corrupt empty space at LEB 2670:125358
> UBIFS error (pid 452): ubifs_scanned_corruption: corruption at LEB 2670:125358
> UBIFS error (pid 452): ubifs_scanned_corruption: first 1618 bytes from LEB 2670:125358
> 00000000: fffffffd ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
> 
> There have been various threads on this type of error over the years, such as:
> http://lists.infradead.org/pipermail/linux-mtd/2012-January/039254.html
> 
> The most notable comment being:
> 
>> ubifs expect empty space to be protected by ecc. But if empty page ecc is not
>> ff, this need hack in the nand driver.
> 
> I find that no, the atmel driver, unlike some others, doesn't attempt to "correct" erased pages which contain bit flips.
> Is the driver still the preferred place to address this issue?  What if the erased space has more bit flips than the ECC strength of the device?  It seems like that block should simply be retired - it has no actual user data.  Will UBIFS handle this particular condition?
> 
> I thought I might try and answer "what would happen?" myself with the nandsim kernel module, but I find it can't provide bitflips in erased data - they are always simulated as "perfect".
Nandsim can generate bitflips by setting bitflips=n. Then read will set a random
bitflip in the read buffer. But this does not always happen. You can read do_bit_flips()
in drivers/mtd/nand/nandsim.c and you will see that only if (bitflips && prandom_u32() < (1<<22)),
(but "prandom_u32() < (1 << 22)" seems unlikely happen) bitflip is generated. So if you
would like to make bitflip likely happen, you could change the condition.

thanks,
Sheng
> 
> Thanks for any input,
> -Brian Hill
> 
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 
> 

  reply	other threads:[~2015-06-27  9:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26 14:31 ubifs_scan: corrupt empty space Brian Hill
2015-06-27  9:28 ` Sheng Yong [this message]
2015-06-27 15:09   ` Brian Hill
2015-06-27 20:11 ` Richard Weinberger
2015-06-27 20:34   ` nick

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=558E6CD5.70201@huawei.com \
    --to=shengyong1@huawei.com \
    --cc=brian@houston-radar.com \
    --cc=linux-mtd@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.