public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Jon Ringle <jon@ringle.org>
Cc: linux-mtd@lists.infradead.org, Deepak Saxena <dsaxena@mvista.com>
Subject: Re: Fail to mount ubifs
Date: Wed, 13 Jan 2010 09:55:36 +0200	[thread overview]
Message-ID: <1263369336.2917.6.camel@localhost> (raw)
In-Reply-To: <152584231001122303g66f776bdo57f6f08307f77dd0@mail.gmail.com>

On Wed, 2010-01-13 at 02:03 -0500, Jon Ringle wrote:
> I believe that there is an alignment problem due to the read function
> mapped to ixp4xx_read16.
> 
> I enabled the following:
> CONFIG_MTD_UBI_DEBUG=y
> CONFIG_MTD_UBI_DEBUG_MSG=y
> CONFIG_MTD_UBI_DEBUG_MSG_EBA=y
> 
> (initramfs) mount -t ubifs ubi0:ubifs /mnt0
> [ 1693.480000] UBI DBG (pid 2323): ubi_open_volume_path: open volume
> ubi0:ubifs, mode 1
> [ 1693.490000] UBI DBG (pid 2323): ubi_open_volume_nm: open device 0,
> volume ubifs, mode 1
> [ 1693.490000] UBI DBG (pid 2323): ubi_open_volume: open device 0,
> volume 2, mode 1
> [ 1693.500000] UBI DBG (pid 2323): ubi_open_volume: open device 0,
> volume 2, mode 2
> [ 1693.510000] UBI DBG (pid 2323): ubi_is_mapped: test LEB 2:0
> <snip...>
> [ 1694.130000] UBI DBG (pid 2323): ubi_is_mapped: test LEB 2:109
> [ 1694.140000] UBI DBG (pid 2323): ubi_leb_change: atomically write
> 560 bytes to LEB 2:6
> [ 1694.150000] UBI DBG (pid 2323): ubi_eba_atomic_leb_change: change
> LEB 2:6, PEB -1, write VID hdr to PEB 5
> 11 bytes starting at LEB 2:6:545 has the following data:
> 0xb7 0xe2 0x02 0xd5 0x9f 0x00 0x00 0xe0 0x7f 0x00 0x00
> 
> <snip...>
> [ 1694.520000] UBI DBG (pid 2323): ubi_leb_read: read 11 bytes from LEB 2:6:545
> [ 1694.530000] UBI DBG (pid 2323): ubi_eba_read_leb: read 11 bytes
> from offset 545 of LEB 2:6, PEB 5
> [ 1694.540000] UBIFS error (pid 2323): check_lpt_crc: invalid crc in
> LPT node: crc e2e2 calc e2b7
> 11 bytes starting at LEB 2:6:545 has the following data:
> 0xe2 0xe2 0x02 0xd5 0x9f 0x00 0x00 0xe0 0x7f 0x00 0x00
> 
> [ 1694.550000] [<c01ca2bc>] (unwind_backtrace+0x0/0x160) from
> [<bf096a34>] (check_lpt_crc+0x9c/0xb0 [ubifs])
> [ 1694.560000] [<bf096a34>] (check_lpt_crc+0x9c/0xb0 [ubifs]) from
> [<bf096f44>] (unpack_ltab+0x114/0x118 [ubifs])
> [ 1694.570000] [<bf096f44>] (unpack_ltab+0x114/0x118 [ubifs]) from
> [<bf097d28>] (lpt_init_rd+0x110/0x6f8 [ubifs])
> [ 1694.580000] [<bf097d28>] (lpt_init_rd+0x110/0x6f8 [ubifs]) from
> [<bf098e4c>] (ubifs_lpt_init+0x30/0x54 [ubifs])
> [ 1694.590000] [<bf098e4c>] (ubifs_lpt_init+0x30/0x54 [ubifs]) from
> [<bf076cb8>] (mount_ubifs+0x368/0x1620 [ubifs])
> [ 1694.600000] [<bf076cb8>] (mount_ubifs+0x368/0x1620 [ubifs]) from
> [<bf078d20>] (ubifs_fill_super+0x318/0x42c [ubifs])
> [ 1694.610000] [<bf078d20>] (ubifs_fill_super+0x318/0x42c [ubifs])
> from [<bf078f0c>] (ubifs_get_sb+0xd8/0x22c [ubifs])
> [ 1694.620000] [<bf078f0c>] (ubifs_get_sb+0xd8/0x22c [ubifs]) from
> [<c023d360>] (vfs_kern_mount+0x68/0x12c)
> [ 1694.630000] [<c023d360>] (vfs_kern_mount+0x68/0x12c) from
> [<c023d468>] (do_kern_mount+0x34/0xdc)
> [ 1694.640000] [<c023d468>] (do_kern_mount+0x34/0xdc) from
> [<c0255ad0>] (do_mount+0x210/0x244)
> [ 1694.650000] [<c0255ad0>] (do_mount+0x210/0x244) from [<c0255ba0>]
> (sys_mount+0x9c/0xd0)
> [ 1694.660000] [<c0255ba0>] (sys_mount+0x9c/0xd0) from [<c01c49e0>]
> (ret_fast_syscall+0x0/0x2c)
> 
> Looking into drivers/mtd/maps/ixp4xx.c I see that the read function is
> ixp4xx_read16(). It seems to me that there is an alignment problem.
> The read starts at offset 545 which in unaligned with a 16-bit read
> that is done by ixp4xx_read16().

Yeah, most probably. Too bad we do not have a test for this. Care to
extend MTD tests?

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

  reply	other threads:[~2010-01-13  7:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 18:56 Fail to mount ubifs Jon Ringle
2010-01-12  0:20 ` Jon Ringle
2010-01-12  4:50   ` Artem Bityutskiy
2010-01-12 12:07     ` Jon Ringle
2010-01-12 21:37       ` Artem Bityutskiy
2010-01-13  0:40         ` Jon Ringle
2010-01-12 20:23     ` Jon Ringle
2010-01-12 20:49       ` Jon Ringle
2010-01-12 21:23         ` Jon Ringle
2010-01-12 21:38         ` Artem Bityutskiy
2010-01-12 21:30       ` Artem Bityutskiy
2010-01-13  0:15         ` Jon Ringle
2010-01-13  7:03           ` Jon Ringle
2010-01-13  7:55             ` Artem Bityutskiy [this message]
2010-01-13  8:06               ` Artem Bityutskiy
2010-01-13 14:20                 ` Jon Ringle
2010-01-12 21:33   ` 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=1263369336.2917.6.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=dsaxena@mvista.com \
    --cc=jon@ringle.org \
    --cc=linux-mtd@lists.infradead.org \
    /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