[RFC PATCH] UBIFS: remove check for all(0xff) for empty pages
Pekon Gupta
pekon at ti.com
Tue Mar 11 02:23:12 EDT 2014
UBIFS throws following error if an blank page does not contain perfect all(0xff)
data, during LEB scan, even though if number of bit-flips is within ecc.strength
"UBIFS error (pid 1): ubifs_scan: corrupt empty space at LEB 417:53168"
But newer technology devices (like MLC NAND) are prone to read-disturb bit-flips
and so having perfect all(0xff) data on empty-pages is practically not feasible
on these newer technology devices (like MLC NAND).
Also, such device spec suggest using stronger ECC schemes (like BCH16), and have
large OOB size to guarantee longer field life.
So this check of perfect all(0xff) data can be safely removed from UBIFS, as
UBI and MTD layers already these before passing the data to UBIFS:
if (number-of-bitflips < mtd->bitflip_threshold)
Driver's ECC scheme is strong enough to handle existing bit-flips in
future, so both MTD and UBI ignore such bit-flips.
if (number-of-bitflips >= mtd->bitflip_threshold)
MTD flags -EUCLEAN.
UBI schedules the block for scrubbing.
if (number-of-bitflips > nand_chip->ecc.strength)
MTD flags -EBADMSG.
UBI tries to extract data relevant data from block based on sanity of
its headers, and then schedule it for re-erase.
Signed-off-by: Pekon Gupta <pekon at ti.com>
---
fs/ubifs/scan.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c
index 58aa05d..b6ab396 100644
--- a/fs/ubifs/scan.c
+++ b/fs/ubifs/scan.c
@@ -332,17 +332,6 @@ struct ubifs_scan_leb *ubifs_scan(const struct ubifs_info *c, int lnum,
ubifs_end_scan(c, sleb, lnum, offs);
- for (; len > 4; offs += 4, buf = buf + 4, len -= 4)
- if (*(uint32_t *)buf != 0xffffffff)
- break;
- for (; len; offs++, buf++, len--)
- if (*(uint8_t *)buf != 0xff) {
- if (!quiet)
- ubifs_err("corrupt empty space at LEB %d:%d",
- lnum, offs);
- goto corrupted;
- }
-
return sleb;
corrupted:
--
1.8.5.1.163.gd7aced9
More information about the linux-mtd
mailing list