Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757204Ab1EaPhz (ORCPT ); Tue, 31 May 2011 11:37:55 -0400 Received: from na3sys009aog105.obsmtp.com ([74.125.149.75]:53032 "EHLO na3sys009aog105.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757119Ab1EaPhx convert rfc822-to-8bit (ORCPT ); Tue, 31 May 2011 11:37:53 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=nanometrics.ca; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=dm1ndnbNY79ZofpMyChLKwQ/L11ZsGhZ7NMAGTZDT0+RamcwpJxp/YAIwUVpNAo61b V1M6cehdJlX6lf3Wek4p+xOixBMSmj/wZPl+wkxGzLv9mKFBZMn0OajkflUADobFPaRG fpt6eYpLdQHlHnSxDONe4AQfxWJWdmYAq1+3s= MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 31 May 2011 11:37:51 -0400 Message-ID: Subject: Re: [PATCH 0/3] fix-up free space earlier in mount_ubifs() From: Ben Gardiner To: "Matthew L. Creech" Cc: Artem Bityutskiy , Adrian Hunter , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5115 Lines: 124 Hi Matthew, To answer your other question: On Tue, May 31, 2011 at 10:43 AM, Matthew L. Creech wrote: > [...] > > Do you happen to know if the same thing occurs when you uncleanly > reboot (so that recovery is needed on the next boot)? ?It looks like > ubifs_recover_master_node() reads the same data that > fixup_leb_free_space() does, so I'd expect it to fail similarly if > that's what's happening, regardless of whether fix-up is performed or > not. To test unclean w/o free-space-fixup flag set I did a powercut during 'yes > /test-file'; The first time I hsaw a dump from ubifs_check_node: UBIFS: recovery needed UBIFS error (pid 1): ubifs_check_node: bad CRC: calculated 0x4763322d, read 0x4c8c2537 UBIFS error (pid 1): ubifs_check_node: bad node at LEB 501:81608 Backtrace: [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r7:00013ec8 r6:c781f000 r5:c89f0ec8 r4:ffffff8b [] (dump_stack+0x0/0x1c) from [] (ubifs_check_node+0x1b8/0x2ec) [] (ubifs_check_node+0x0/0x2ec) from [] (ubifs_scan_a_node+0x180/0x398) [] (ubifs_scan_a_node+0x0/0x398) from [] (ubifs_recover_leb+0xd4/0xa94) [] (ubifs_recover_leb+0x0/0xa94) from [] (ubifs_replay_journal+0x6ac/0x1c30) [] (ubifs_replay_journal+0x0/0x1c30) from [] (ubifs_fill_super+0xdf4/0x1ee4) [] (ubifs_fill_super+0x0/0x1ee4) from [] (ubifs_mount+0x270/0x3a4) [] (ubifs_mount+0x0/0x3a4) from [] (mount_fs+0x1c/0xe8) [] (mount_fs+0x0/0xe8) from [] (vfs_kern_mount+0x58/0x94) r6:00008000 r5:c780c780 r4:c7a78b80 [] (vfs_kern_mount+0x0/0x94) from [] (do_kern_mount+0x3c/0xd4) r9:c782dee8 r8:c03ebaa8 r7:c7a78b60 r6:00000000 r5:c7a78b80 r4:00008000 [] (do_kern_mount+0x0/0xd4) from [] (do_mount+0x14c/0x734) r9:c782dee8 r8:00000020 r7:c7a78b60 r6:c7a78b80 r5:00008000 r4:00000000 [] (do_mount+0x0/0x734) from [] (sys_mount+0xa0/0xd0) [] (sys_mount+0x0/0xd0) from [] (mount_block_root+0x98/0x2c8) r7:c0023e88 r6:c781b000 r5:00008000 r4:c781b000 [] (mount_block_root+0x0/0x2c8) from [] (prepare_namespace+0x80/0x1c4) [] (prepare_namespace+0x0/0x1c4) from [] (kernel_init+0x110/0x158) r7:00000013 r6:c0023300 r5:c0023668 r4:c0023668 [] (kernel_init+0x0/0x158) from [] (do_exit+0x0/0x750) r7:00000013 r6:c0043d58 r5:c0008370 r4:00000000 UBIFS: recovery completed every time after that there is nothing printed during recovery: UBIFS: recovery needed UBIFS: recovery completed UBIFS: mounted UBI device 0, volume 1, name "rootfs" To test unclean with free-space-flag set, I did powercut during 'nand write' in u-boot. When attempting to mount the rootfs I got dumps from ubifs_read_node: UBIFS error (pid 1): ubifs_read_node: bad node type (255 but expected 9) UBIFS error (pid 1): ubifs_read_node: bad node at LEB 496:101088, LEB mapping status 0 Backtrace: [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r7:c782c000 r6:c781f000 r5:c7859780 r4:ffffffea [] (dump_stack+0x0/0x1c) from [] (ubifs_read_node+0x238/0x2ec) [] (ubifs_read_node+0x0/0x2ec) from [] (dbg_old_index_check_init+0x70/0xe0) [] (dbg_old_index_check_init+0x0/0xe0) from [] (ubifs_read_master+0xdbc/0xe20) [] (ubifs_read_master+0x0/0xe20) from [] (ubifs_fill_super+0xc48/0x1ee4) [] (ubifs_fill_super+0x0/0x1ee4) from [] (ubifs_mount+0x270/0x3a4) [] (ubifs_mount+0x0/0x3a4) from [] (mount_fs+0x1c/0xe8) [] (mount_fs+0x0/0xe8) from [] (vfs_kern_mount+0x58/0x94) r6:00008000 r5:c780c780 r4:c7a848e0 [] (vfs_kern_mount+0x0/0x94) from [] (do_kern_mount+0x3c/0xd4) r9:c782dee8 r8:c03ebaa8 r7:c7a848c0 r6:00000000 r5:c7a848e0 r4:00008000 [] (do_kern_mount+0x0/0xd4) from [] (do_mount+0x14c/0x734) r9:c782dee8 r8:00000020 r7:c7a848c0 r6:c7a848e0 r5:00008000 r4:00000000 [] (do_mount+0x0/0x734) from [] (sys_mount+0xa0/0xd0) [] (sys_mount+0x0/0xd0) from [] (mount_block_root+0x98/0x2c8) r7:c0023e88 r6:c781b000 r5:00008000 r4:c781b000 [] (mount_block_root+0x0/0x2c8) from [] (prepare_namespace+0x80/0x1c4) [] (prepare_namespace+0x0/0x1c4) from [] (kernel_init+0x110/0x158) r7:00000013 r6:c0023300 r5:c0023668 r4:c0023668 [] (kernel_init+0x0/0x158) from [] (do_exit+0x0/0x750) r7:00000013 r6:c0043d58 r5:c0008370 r4:00000000 I didn't ever see the -74 errors or the assertion I placed in ubifs_write_node(). Best Regards, Ben Gardiner --- Nanometrics Inc. http://www.nanometrics.ca -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/