UBIFS fails to mount on second boot

Artem Bityutskiy dedekind1 at gmail.com
Sat Jul 14 00:39:38 EDT 2012


On Tue, 2012-07-03 at 11:16 +1000, Iwo Mergler wrote:
> Thanks for the hint, I have. Turns out it's fairly simple, just pass
> ddebug_query="module ubifs +p" on the command line. Unfortunately,
> the way ddebug parses the line, you can only have one rule there.

Iwo, if you send more logs, please, include function names because
otherwise the logs are very difficult to follow. I think it wold be +pf.
> 
> I think there may be a change in newer kernels that allows to use
> a semicolon as a separator between rules, but my kernel doesn't
> allow that.
> 
> So I had to make two debug runs, one each for ubi and ubifs debugging
> enabled.
> 
> The attached archive contains 4 log files:
> 
> konsole_ubi_1.txt   = first (successful) boot with UBI debug enabled
> konsole_ubi_2.txt   = second (failed) boot with UBI debug enabled
> konsole_ubifs_1.txt = first (successful) boot with UBIFS debug enabled
> konsole_ubifs_2.txt = second (failed) boot with UBIFS debug enabled 

I suspect this is a bug in the free space fixup code - my level of
confidence on this is 80%. Could you please verify this by removing the
-F mkfs.ubifs parameter or using the patch below. Thanks!

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 5862dd9..3398114 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1295,11 +1295,13 @@ static int mount_ubifs(struct ubifs_info *c)
 	if (err)
 		goto out_master;
 
+#if 0
 	if (!c->ro_mount && c->space_fixup) {
 		err = ubifs_fixup_free_space(c);
 		if (err)
 			goto out_lpt;
 	}
+#endif
 
 	if (!c->ro_mount) {
 		/*

-- 
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/20120714/02ef784c/attachment-0001.sig>


More information about the linux-mtd mailing list