diff mbox

UBI FAQ: document behaviour when lots of blocks go bad

Message ID 20120404212736.5DBB39D401E@zog.reactivated.net
State Accepted
Commit 6953b6f41c57c986581350ed5f041d858716d32f
Headers show

Commit Message

Daniel Drake April 4, 2012, 9:27 p.m. UTC
Based on an email from Artem.

Signed-off-by: Daniel Drake <dsd@laptop.org>
---
 faq/ubi.xml |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/faq/ubi.xml b/faq/ubi.xml
index c9f1c57..8af461e 100644
--- a/faq/ubi.xml
+++ b/faq/ubi.xml
@@ -26,6 +26,7 @@ 
 	<li><a href="ubi.html#L_restrict">Can UBI logical eraseblocks be written randomly?</a></li>
 	<li><a href="ubi.html#L_why_no_oob">Why UBI does not use OOB area of NAND flashes?</a></li>
 	<li><a href="ubi.html#L_crash_safe">Is UBI tolerant of power failures?</a></li>
+	<li><a href="ubi.html#L_bad_blocks_exceeded">What happens when the PEBs reserved for bad block handling run out?</a></li>
 	<li><a href="ubi.html#L_mlc">May UBI be used on MLC flash?</a></li>
 	<li><a href="ubi.html#L_vid_offset_mismatch">Why does ubiattach on a freshly formatted device fail with "Invalid argument"?</a></li>
 	<li><a href="ubi.html#L_subpage">What is a sub-page?</a></li>
@@ -456,6 +457,22 @@  must be an issue for UBI as well.</p>
 
 
 
+<h2><a name="L_bad_blocks_exceeded">What happens when the PEBs reserved for bad block handling run out?</a></h2>
+
+By default, 1% of the available PEBs are reserved for handling bad blocks.
+
+If the number of blocks that turn bad exceeds that allocation, an error
+will be presented and UBI will switch to read-only mode.
+
+To recover from this error you could re-flash the device. The run-time
+recovery would require deleting or shrinking one of the UBI volumes.
+
+So, you need to carefully select the amount of PEBs reserved for bad
+blocks handling. For Nokia phones like N900 (with Samsung OneNAND flash,
+256MiB in size, 128KiB PEBs) 1% was just fine.
+
+
+
 <h2><a name="L_mlc">May UBI be used on MLC flash?</a></h2>
 
 <p>Yes, it may, as long as the flash is supported by the MTD layer. UBI does