UBI problems on 2nd mount

Artem Bityutskiy dedekind1 at gmail.com
Fri Aug 17 10:27:24 EDT 2012


On Fri, 2012-08-17 at 16:12 +0200, Uwe Kleine-König wrote:
> Hello,
> 
> On Thu, Aug 16, 2012 at 12:54:45PM +0200, Uwe Kleine-König wrote:
> > I'm on v3.6-rc1 with a few patches, but all unrelated to ubi/ubifs.
> > I'm experiencing a very similar problem to the one James Nute and Iwo
> > Mergler reported which resulted in commit c6727932c (included in
> > v3.6-rc1).
> > 
> > The first boot looks ok, but on the second boot it fails with 
> > 
> > 	[   14.843501] UBIFS error (pid 1): replay_log_leb: first CS node at LEB 3:0 has wrong commit number 0 expected 1
> > 	[   14.853626] UBIFS error (pid 1): replay_log_leb: log error detected while replaying the log at LEB 3:0
> > 
> > It doesn't reproduce 100%, I only saw it after issuing $(poweroff) and
> > then only if that resulted in the error
> > 
> > 	[  173.019073] UBI error: ubi_io_write: error -5 while writing 64 bytes to PEB 30:0, written 0 bytes
> > 
> > $(reboot) and just switching off + reenabling the power supply don't
> > yield this problem.
> > 
> > The same happes if I don't use -F (space_fixup) for mkfs.ubifs.
> > (Then the two ubifs_assert(!c->space_fixup); in ubifs_write_node are not
> > hit which I think are a seperate problem.) The kernel panic after power
> > off is a seperate problem that is triggered because poweroff doesn't
> > stop the cpu.
> While bisecting I noticed that doing poweroff after the machine is up
> for some time the issue doesn't occur. Bisection yielded commit
> 
> commit d51f17ea0a3afe11fb4c4ad6635877e24df2758f
> Author: Artem Bityutskiy <Artem.Bityutskiy at linux.intel.com>
> Date:   Sat Jul 14 20:52:58 2012 +0300

Thanks Uwe. I think this patch will fix the issue:

From e9d7e9731df27b4ef5190f919f9f96334439a36c Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Date: Fri, 17 Aug 2012 17:21:14 +0300
Subject: [PATCH] UBIFS: fix regression

Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
---
 fs/ubifs/replay.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c
index eba46d4..57ca44d 100644
--- a/fs/ubifs/replay.c
+++ b/fs/ubifs/replay.c
@@ -1026,7 +1026,6 @@ int ubifs_replay_journal(struct ubifs_info *c)
 	c->replaying = 1;
 	lnum = c->ltail_lnum = c->lhead_lnum;
 
-	lnum = UBIFS_LOG_LNUM;
 	do {
 		err = replay_log_leb(c, lnum, 0, c->sbuf);
 		if (err == 1)
-- 
1.7.10.4

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120817/7806002f/attachment-0001.sig>


More information about the linux-mtd mailing list