All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: linux-mtd@lists.infradead.org, Adrian Hunter <adrian.hunter@nokia.com>
Subject: [PATCH 2/2] UBIFS: add unstable pages problem description
Date: Mon, 18 Oct 2010 13:02:05 +0300	[thread overview]
Message-ID: <1287396125-1890-1-git-send-email-dedekind1@gmail.com> (raw)

From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

Describe a problem reported by Matthieu CASTET which is currently
not handled by UBIFS.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 fs/ubifs/replay.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c
index eed0fcf..e04d74a 100644
--- a/fs/ubifs/replay.c
+++ b/fs/ubifs/replay.c
@@ -32,6 +32,28 @@
  * larger is the journal, the more memory its index may consume.
  */
 
+/*
+ * Problem description: unstable pages after unclean power cut on NAND flashes.
+ *
+ * If a power cut happens when we have ongoing NAND page program, this page
+ * becomes unstable. The following situations are possible when we mount this
+ * flash next time and UBIFS reads the page.
+ *   o The page may look like it is empty, i.e., it contains only 0xFFs, but
+ *     we write data there, the data becomes corrupted. I.e., when the data are
+ *     read, we may get a ECC errors. Moreover, the page may be read with no
+ *     errors sometimes, with an ECC error next time, with a bit-flip next
+ *     time, etc.
+ *   o The page may have bit-flip, but when it is read next time, it may have
+ *     ECC errors or no errors at all.
+ *   o An UBIFS	node may have correct CRC, but when it is read next time, it
+ *     may have CRC error.
+ *
+ * IOW, these unstable pages are disaster. UBIFS has to handle them correctly:
+ * never write to them and never rely on their contents.
+ *
+ * TODO: handle this for buds, log, orphan area, and master area.
+ */
+
 #include "ubifs.h"
 
 /*
-- 
1.7.2.3

             reply	other threads:[~2010-10-18 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18 10:02 Artem Bityutskiy [this message]
2010-10-19  7:57 ` [PATCH 2/2] UBIFS: add unstable pages problem description Artem Bityutskiy
2010-10-20  9:52   ` Matthieu CASTET

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=1287396125-1890-1-git-send-email-dedekind1@gmail.com \
    --to=dedekind1@gmail.com \
    --cc=adrian.hunter@nokia.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=matthieu.castet@parrot.com \
    /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.