From patchwork Fri Aug 17 14:27:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: UBI problems on 2nd mount X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 178222 Message-Id: <1345213644.27859.94.camel@sauron.fi.intel.com> To: Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= Cc: James Nute , Iwo Mergler , linux-mtd@lists.infradead.org, kernel@pengutronix.de Date: Fri, 17 Aug 2012 17:27:24 +0300 From: Artem Bityutskiy List-Id: Linux MTD discussion mailing list 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 > 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 Date: Fri, 17 Aug 2012 17:21:14 +0300 Subject: [PATCH] UBIFS: fix regression Signed-off-by: Artem Bityutskiy Reported-by: Uwe Kleine-König Tested-by: Uwe Kleine-König --- 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)