Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] UBIFS: remove check for all(0xff) for empty pages
@ 2014-03-11  6:23 Pekon Gupta
  2014-03-11  7:42 ` Artem Bityutskiy
  2014-03-11 12:35 ` Matthieu CASTET
  0 siblings, 2 replies; 8+ messages in thread
From: Pekon Gupta @ 2014-03-11  6:23 UTC (permalink / raw)
  To: Brian Norris, Artem Bityutskiy
  Cc: Kent Li, HOUR Frderic, linux-mtd, Pekon Gupta, Ezequiel Garcia,
	Stefan Roese

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@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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-21  7:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-11  6:23 [RFC PATCH] UBIFS: remove check for all(0xff) for empty pages Pekon Gupta
2014-03-11  7:42 ` Artem Bityutskiy
2014-03-11 11:41   ` Gupta, Pekon
2014-03-11 12:21   ` Matthieu CASTET
2014-03-11 13:06     ` Artem Bityutskiy
2014-03-11 12:35 ` Matthieu CASTET
2014-03-11 12:51   ` Kent Li
2014-03-21  7:57   ` Gupta, Pekon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox