public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Gardiner <bengardiner@nanometrics.ca>
To: Artem Bityutskiy <dedekind1@gmail.com>,
	Adrian Hunter <adrian.hunter@nokia.com>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Matthew L. Creech" <mlcreech@gmail.com>
Subject: [PATCH 0/3] fix-up free space earlier in mount_ubifs()
Date: Mon, 30 May 2011 14:56:13 -0400	[thread overview]
Message-ID: <cover.1306780983.git.bengardiner@nanometrics.ca> (raw)

In testing Mattew Creech's free-space-fixup flag series I found that was unable
to boot a da850evm which had flashed to it's NAND a ubinized image containing a
UBIFS that has the free-space-fixup flag set.

The cause of the problem was found to be the call to ubifs_write_master() from
mount_ubifs() as is evidenced the backtrace produced by the assertion
introduced in the first patch of this series; where the assertion introduced is
that c->space_fixup is false when ubifs_write_node() is called.

UBIFS assert failed in ubifs_write_node at 766 (pid 1)
Backtrace:
[<c002dd8c>] (dump_backtrace+0x0/0x10c) from [<c02ecb8c>] (dump_stack+0x18/0x1c)
 r7:00000001 r6:c782c000 r5:c781f000 r4:c03fb468
[<c02ecb74>] (dump_stack+0x0/0x1c) from [<c015cd68>] (ubifs_write_node+0x20c/0x230)
[<c015cb5c>] (ubifs_write_node+0x0/0x230) from [<c0162930>] (ubifs_write_master+0xbc/0x228)
[<c0162874>] (ubifs_write_master+0x0/0x228) from [<c0158108>] (ubifs_fill_super+0x1d54/0x1ed8)
 r6:0001e5a0 r5:00000000 r4:00000000
[<c01563b4>] (ubifs_fill_super+0x0/0x1ed8) from [<c01584fc>] (ubifs_mount+0x270/0x3a4)
[<c015828c>] (ubifs_mount+0x0/0x3a4) from [<c00afe5c>] (mount_fs+0x1c/0xe8)
[<c00afe40>] (mount_fs+0x0/0xe8) from [<c00cc8c0>] (vfs_kern_mount+0x58/0x94)
 r6:00008000 r5:c780c780 r4:c7a6e9e0
[<c00cc868>] (vfs_kern_mount+0x0/0x94) from [<c00cc958>] (do_kern_mount+0x3c/0xd4)
 r9:c782dee8 r8:c03ebaa8 r7:c7a6ea00 r6:00000000 r5:c7a6e9e0
r4:00008000
[<c00cc91c>] (do_kern_mount+0x0/0xd4) from [<c00ccb3c>] (do_mount+0x14c/0x734)
 r9:c782dee8 r8:00000020 r7:c7a6ea00 r6:c7a6e9e0 r5:00008000
r4:00000000
[<c00cc9f0>] (do_mount+0x0/0x734) from [<c00cd1c4>] (sys_mount+0xa0/0xd0)
[<c00cd124>] (sys_mount+0x0/0xd0) from [<c0008dd4>] (mount_block_root+0x98/0x2c8)
 r7:c0023e88 r6:c781b000 r5:00008000 r4:c781b000
[<c0008d3c>] (mount_block_root+0x0/0x2c8) from [<c00090f0>] (prepare_namespace+0x80/0x1c4)
[<c0009070>] (prepare_namespace+0x0/0x1c4) from [<c0008480>] (kernel_init+0x110/0x158)
 r7:00000013 r6:c0023300 r5:c0023668 r4:c0023668
[<c0008370>] (kernel_init+0x0/0x158) from [<c0043d58>] (do_exit+0x0/0x750)
 r7:00000013 r6:c0043d58 r5:c0008370 r4:00000000

Moving the free-space-fixup to before the call to ubifs_write_master() requires that the
LPT be initialiazed first; therefore the second patch of this series moves the 
ubifs_lpt_init() call to before the call to ubifs_write_master() in preparation of moving
the free-space fixup. 

Finally, the free-space fixup is moved to earlier in the mounting process -- in testing this
has resulted in a bootable da850evm and no assertion errors.

Ben Gardiner (3):
  UBIFS: assert no fixup when writing a node
  UBIFS: intialize the LPT earlier
  UBIFS: fix-up free space earlier

 fs/ubifs/io.c    |    2 ++
 fs/ubifs/super.c |   24 ++++++++++++------------
 2 files changed, 14 insertions(+), 12 deletions(-)

-- 
1.7.4.1


             reply	other threads:[~2011-05-30 18:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30 18:56 Ben Gardiner [this message]
2011-05-30 18:56 ` [PATCH 1/3] UBIFS: assert no fixup when writing a node Ben Gardiner
2011-06-01 10:03   ` Artem Bityutskiy
2011-05-30 18:56 ` [PATCH 2/3] UBIFS: intialize the LPT earlier Ben Gardiner
2011-06-01 10:06   ` Artem Bityutskiy
2011-05-30 18:56 ` [PATCH 3/3] UBIFS: fix-up free space earlier Ben Gardiner
2011-06-01 10:16   ` Artem Bityutskiy
2011-06-01 14:53     ` [PATCH] UBIFS: fixup merged 'UBIFS: fix-up free space earlier' Ben Gardiner
2011-06-01 15:03       ` Artem Bityutskiy
2011-06-01 15:14       ` Artem Bityutskiy
2011-06-01 15:28         ` Ben Gardiner
2011-05-31 14:43 ` [PATCH 0/3] fix-up free space earlier in mount_ubifs() Matthew L. Creech
2011-05-31 14:52   ` Ben Gardiner
2011-05-31 15:22     ` Matthew L. Creech
2011-06-01 10:20       ` Artem Bityutskiy
2011-05-31 15:37   ` Ben Gardiner
2011-06-01 10:19 ` Artem Bityutskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1306780983.git.bengardiner@nanometrics.ca \
    --to=bengardiner@nanometrics.ca \
    --cc=adrian.hunter@nokia.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mlcreech@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox