Why data is moved upon fixable bit-flip

Richard Weinberger richard.weinberger at gmail.com
Mon Jul 17 05:49:51 PDT 2017


Danesh,

On Mon, Jul 17, 2017 at 2:31 PM, Danesh Daroui <Danesh.Daroui at ascom.com> wrote:
> Hi all,
>
> I am running some torture tests on a NAND flash memory having UBIFS on it. Running the tests for few days shows some errors which are apparently fixable by UBI. Some errors look like:
>
> UBI DBG (pid 25): ubi_io_read: fixable bit-flip detected at PEB 557
> UBI DBG (pid 25): ubi_io_read: fixable bit-flip detected at PEB 1627
> UBI: run torture test for PEB 1627
> UBI: PEB 1627 passed torture test, do not mark it a bad
> UBI DBG (pid 25): ubi_io_read: fixable bit-flip detected at PEB 557
> UBI DBG (pid 25): ubi_io_read: fixable bit-flip detected at PEB 1627
> UBI: run torture test for PEB 1627
> UBI: PEB 1627 passed torture test, do not mark it a bad
> UBI DBG (pid 25): ubi_io_read: fixable bit-flip detected at PEB 557
> UBI DBG (pid 25): ubi_io_read: fixable bit-flip detected at PEB 1627
> UBI: run torture test for PEB 1627
> UBI: PEB 1627 passed torture test, do not mark it a bad
>
> which are promising since it seems that the file system has been able to fix the error as it says "fixable bit-flip'. However, some other errors are like:
>
> UBI DBG (pid 1691): ubi_io_read: fixable bit-flip detected at PEB 1546
> UBI DBG (pid 1691): ubi_wl_scrub_peb: schedule PEB 1546 for scrubbing
> UBI DBG (pid 25): ubi_io_read: fixable bit-flip detected at PEB 1546
> UBI: scrubbed PEB 1546 (LEB 3:177), data moved to PEB 1875
> UBI DBG (pid 1691): ubi_io_read: fixable bit-flip detected at PEB 217
> UBI DBG (pid 1691): ubi_wl_scrub_peb: schedule PEB 217 for scrubbing
> UBI DBG (pid 25): ubi_io_read: fixable bit-flip detected at PEB 217
> UBI: scrubbed PEB 217 (LEB 3:937), data moved to PEB 1875
> UBI DBG (pid 1691): ubi_io_read: fixable bit-flip detected at PEB 1546
> UBI DBG (pid 1691): ubi_wl_scrub_peb: schedule PEB 1546 for scrubbing
> UBI DBG (pid 25): ubi_io_read: fixable bit-flip detected at PEB 1546
> UBI: scrubbed PEB 1546 (LEB 3:1054), data moved to PEB 1875
>
> This is a bit strange though, because the data is moved even when the error was fixable because of bit-flip as the log says.

None of these messages are errors. Since you've enabled debug logging
UBI is a bit chatty.

> Now I would like to know why the data is moved even when it is fixable? Is it something that we need to be worried about? Why the bit-flip is not simply corrected as it is in the former case but it is rather scrubbed and the data is moved? Also, will the PEB be marked as unusable bad cell when it is scrubbed and the data is moved to another PEB?

Bit-flips indicate that the PEB is aging and UBI tries to find out
whether it is still good or not.
To do that it has to move the data to a good PEB first because the PEB
torture function is erasing
and writing it.
Please note that we have a threshold in MTD such that UBI sees the
bit-flips not immediately.

So, bit-flips are okay but on a fresh and decent SLC I'd not expect
much of them.

-- 
Thanks,
//richard



More information about the linux-mtd mailing list