* ubi: fastmap: v7: ubi_update_fastmap failure
@ 2012-06-05 13:41 Shmulik Ladkani
2012-06-05 13:49 ` Richard Weinberger
0 siblings, 1 reply; 5+ messages in thread
From: Shmulik Ladkani @ 2012-06-05 13:41 UTC (permalink / raw)
To: Richard Weinberger
Cc: Artem Bityutskiy, adrian.hunter, Heinz.Egger, linux-mtd, tim.bird,
tglx
Hi Richard,
I got the below UBI error when working with fastmap v7 (linux-ubi.git,
branch fastmap, HEAD at bd8313d).
Had no time to investigate (could be fixed by your v7+ patches); please
take a look if you can.
Setup:
- Beagle with SLC NAND.
- ubi.mtd=4 root=ubi0:beagleboard-rootfs rootfstype=ubifs
- A single volume on the ubi0 device (the ubifs rootfs).
The board booted several times succesfully with fastmap-v7.
Then I got the error below, when ubifs was mounted (note UBI attach was
successful).
Switched to non-fastmap kernel, board booted successfully (with ubifs
mounted succesfully).
Regards,
Shmulik
[ 3.222808] UBIFS: recovery needed
[ 3.281646] UBI error: __ubi_wl_get_peb: no free eraseblocks
[ 3.287750] UBI error: ubi_wl_get_fm_peb: no free eraseblocks
[ 3.294952] UBI error: ubi_update_fastmap: Erase counter overflow!
[ 3.301483] UBI warning: ubi_ro_mode: switch to read-only mode
[ 3.307739] [<c00191f4>] (unwind_backtrace+0x0/0xf8) from [<c02c2694>] (ubi_wl_get_peb+0x254/0x270)
[ 3.317291] [<c02c2694>] (ubi_wl_get_peb+0x254/0x270) from [<c02be600>] (ubi_eba_atomic_leb_change+0x168/0x320)
[ 3.327941] [<c02be600>] (ubi_eba_atomic_leb_change+0x168/0x320) from [<c02bccec>] (ubi_leb_change+0xb8/0xd4)
[ 3.338409] [<c02bccec>] (ubi_leb_change+0xb8/0xd4) from [<c01b9b9c>] (ubifs_leb_change+0x28/0x88)
[ 3.347900] [<c01b9b9c>] (ubifs_leb_change+0x28/0x88) from [<c01ca238>] (ubifs_recover_leb+0x390/0x700)
[ 3.357818] [<c01ca238>] (ubifs_recover_leb+0x390/0x700) from [<c01c00f8>] (ubifs_replay_journal+0xa80/0x105c)
[ 3.368347] [<c01c00f8>] (ubifs_replay_journal+0xa80/0x105c) from [<c01b7ec4>] (ubifs_mount+0xd4c/0x1408)
[ 3.378448] [<c01b7ec4>] (ubifs_mount+0xd4c/0x1408) from [<c00d82f4>] (mount_fs+0x44/0x178)
[ 3.387298] [<c00d82f4>] (mount_fs+0x44/0x178) from [<c00eea74>] (vfs_kern_mount+0x4c/0xb4)
[ 3.396118] [<c00eea74>] (vfs_kern_mount+0x4c/0xb4) from [<c00eeedc>] (do_kern_mount+0x34/0xd0)
[ 3.405303] [<c00eeedc>] (do_kern_mount+0x34/0xd0) from [<c00f0630>] (do_mount+0x2d8/0x710)
[ 3.414123] [<c00f0630>] (do_mount+0x2d8/0x710) from [<c00f0af4>] (sys_mount+0x84/0xc4)
[ 3.422576] [<c00f0af4>] (sys_mount+0x84/0xc4) from [<c05c9bac>] (mount_block_root+0xec/0x228)
[ 3.431671] [<c05c9bac>] (mount_block_root+0xec/0x228) from [<c05c9f74>] (prepare_namespace+0x8c/0x1b8)
[ 3.441589] [<c05c9f74>] (prepare_namespace+0x8c/0x1b8) from [<c05c98f4>] (kernel_init+0x15c/0x194)
[ 3.451141] [<c05c98f4>] (kernel_init+0x15c/0x194) from [<c00141d0>] (kernel_thread_exit+0x0/0x8)
[ 3.460540] UBIFS error (pid 1): ubifs_leb_change: changing 36864 bytes in LEB 3185 failed, error -22
[ 3.470275] UBIFS warning (pid 1): ubifs_ro_mode: switched to read-only mode, error -22
[ 3.478729] [<c00191f4>] (unwind_backtrace+0x0/0xf8) from [<c01b9bf0>] (ubifs_leb_change+0x7c/0x88)
[ 3.488281] [<c01b9bf0>] (ubifs_leb_change+0x7c/0x88) from [<c01ca238>] (ubifs_recover_leb+0x390/0x700)
[ 3.498199] [<c01ca238>] (ubifs_recover_leb+0x390/0x700) from [<c01c00f8>] (ubifs_replay_journal+0xa80/0x105c)
[ 3.508728] [<c01c00f8>] (ubifs_replay_journal+0xa80/0x105c) from [<c01b7ec4>] (ubifs_mount+0xd4c/0x1408)
[ 3.518829] [<c01b7ec4>] (ubifs_mount+0xd4c/0x1408) from [<c00d82f4>] (mount_fs+0x44/0x178)
[ 3.527648] [<c00d82f4>] (mount_fs+0x44/0x178) from [<c00eea74>] (vfs_kern_mount+0x4c/0xb4)
[ 3.536468] [<c00eea74>] (vfs_kern_mount+0x4c/0xb4) from [<c00eeedc>] (do_kern_mount+0x34/0xd0)
[ 3.545654] [<c00eeedc>] (do_kern_mount+0x34/0xd0) from [<c00f0630>] (do_mount+0x2d8/0x710)
[ 3.554473] [<c00f0630>] (do_mount+0x2d8/0x710) from [<c00f0af4>] (sys_mount+0x84/0xc4)
[ 3.562927] [<c00f0af4>] (sys_mount+0x84/0xc4) from [<c05c9bac>] (mount_block_root+0xec/0x228)
[ 3.572021] [<c05c9bac>] (mount_block_root+0xec/0x228) from [<c05c9f74>] (prepare_namespace+0x8c/0x1b8)
[ 3.581939] [<c05c9f74>] (prepare_namespace+0x8c/0x1b8) from [<c05c98f4>] (kernel_init+0x15c/0x194)
[ 3.591491] [<c05c98f4>] (kernel_init+0x15c/0x194) from [<c00141d0>] (kernel_thread_exit+0x0/0x8)
[ 3.600830] UBIFS error (pid 1): ubifs_recover_leb: LEB 3185 scanning failed
[ 3.613342] List of all partitions:
[ 3.617126] 1f00 512 mtdblock0 (driver?)
[ 3.622528] 1f01 1920 mtdblock1 (driver?)
[ 3.627899] 1f02 128 mtdblock2 (driver?)
[ 3.633209] 1f03 4096 mtdblock3 (driver?)
[ 3.638580] 1f04 517632 mtdblock4 (driver?)
[ 3.643920] No filesystem could mount root, tried: ubifs
[ 3.649749] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ubi: fastmap: v7: ubi_update_fastmap failure
2012-06-05 13:41 ubi: fastmap: v7: ubi_update_fastmap failure Shmulik Ladkani
@ 2012-06-05 13:49 ` Richard Weinberger
2012-06-05 14:01 ` Artem Bityutskiy
2012-06-05 20:20 ` Shmulik Ladkani
0 siblings, 2 replies; 5+ messages in thread
From: Richard Weinberger @ 2012-06-05 13:49 UTC (permalink / raw)
To: Shmulik Ladkani
Cc: Artem Bityutskiy, adrian.hunter, Heinz.Egger, linux-mtd, tim.bird,
tglx
[-- Attachment #1: Type: text/plain, Size: 1329 bytes --]
Am 05.06.2012 15:41, schrieb Shmulik Ladkani:
> Hi Richard,
>
> I got the below UBI error when working with fastmap v7 (linux-ubi.git,
> branch fastmap, HEAD at bd8313d).
>
> Had no time to investigate (could be fixed by your v7+ patches); please
> take a look if you can.
>
> Setup:
> - Beagle with SLC NAND.
> - ubi.mtd=4 root=ubi0:beagleboard-rootfs rootfstype=ubifs
> - A single volume on the ubi0 device (the ubifs rootfs).
>
> The board booted several times succesfully with fastmap-v7.
> Then I got the error below, when ubifs was mounted (note UBI attach was
> successful).
>
> Switched to non-fastmap kernel, board booted successfully (with ubifs
> mounted succesfully).
>
> Regards,
> Shmulik
>
> [ 3.222808] UBIFS: recovery needed
> [ 3.281646] UBI error: __ubi_wl_get_peb: no free eraseblocks
> [ 3.287750] UBI error: ubi_wl_get_fm_peb: no free eraseblocks
> [ 3.294952] UBI error: ubi_update_fastmap: Erase counter overflow!
Please use v7+.
It looks like you need:
[PATCH 01/23] UBI: Fastmap: Fix EC overflow calculation
If fastmap does not get a free PEB with a pnum < 64, it tries to reuse the old one.
In this code branch it erases the PEB and checks for a EC overflow.
This check is wrong in v7 (didn't use be64_to_cpu(), sorry!).
Thanks,
//richard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ubi: fastmap: v7: ubi_update_fastmap failure
2012-06-05 13:49 ` Richard Weinberger
@ 2012-06-05 14:01 ` Artem Bityutskiy
2012-06-05 20:20 ` Shmulik Ladkani
1 sibling, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2012-06-05 14:01 UTC (permalink / raw)
To: Richard Weinberger
Cc: adrian.hunter, Heinz.Egger, linux-mtd, Shmulik Ladkani, tglx,
tim.bird
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
On Tue, 2012-06-05 at 15:49 +0200, Richard Weinberger wrote:
> Please use v7+.
> It looks like you need:
> [PATCH 01/23] UBI: Fastmap: Fix EC overflow calculation
Just pushed that to linux-ubi.git / fastmap.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ubi: fastmap: v7: ubi_update_fastmap failure
2012-06-05 13:49 ` Richard Weinberger
2012-06-05 14:01 ` Artem Bityutskiy
@ 2012-06-05 20:20 ` Shmulik Ladkani
2012-06-05 20:31 ` Richard Weinberger
1 sibling, 1 reply; 5+ messages in thread
From: Shmulik Ladkani @ 2012-06-05 20:20 UTC (permalink / raw)
To: Richard Weinberger, Artem Bityutskiy
Cc: Heinz.Egger, tglx, linux-mtd, tim.bird, adrian.hunter
Hi,
On Tue, 05 Jun 2012 15:49:53 +0200 Richard Weinberger <richard@nod.at> wrote:
> Am 05.06.2012 15:41, schrieb Shmulik Ladkani:
> > Hi Richard,
> >
> > I got the below UBI error when working with fastmap v7 (linux-ubi.git,
> > branch fastmap, HEAD at bd8313d).
> >
> > Had no time to investigate (could be fixed by your v7+ patches); please
> > take a look if you can.
> >
> > Setup:
> > - Beagle with SLC NAND.
> > - ubi.mtd=4 root=ubi0:beagleboard-rootfs rootfstype=ubifs
> > - A single volume on the ubi0 device (the ubifs rootfs).
> >
> > The board booted several times succesfully with fastmap-v7.
> > Then I got the error below, when ubifs was mounted (note UBI attach was
> > successful).
> >
> > Switched to non-fastmap kernel, board booted successfully (with ubifs
> > mounted succesfully).
> >
> > Regards,
> > Shmulik
> >
> > [ 3.222808] UBIFS: recovery needed
> > [ 3.281646] UBI error: __ubi_wl_get_peb: no free eraseblocks
> > [ 3.287750] UBI error: ubi_wl_get_fm_peb: no free eraseblocks
> > [ 3.294952] UBI error: ubi_update_fastmap: Erase counter overflow!
>
> Please use v7+.
> It looks like you need:
> [PATCH 01/23] UBI: Fastmap: Fix EC overflow calculation
Thanks, will retest.
BTW, a UBIFS question.
Any idea why UBIFS failed to mount eventually?
As you can see, both UBI and UBIFS switched themselves to RO mode. Okay.
However eventually, the mount failed.
Regards,
Shmulik
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ubi: fastmap: v7: ubi_update_fastmap failure
2012-06-05 20:20 ` Shmulik Ladkani
@ 2012-06-05 20:31 ` Richard Weinberger
0 siblings, 0 replies; 5+ messages in thread
From: Richard Weinberger @ 2012-06-05 20:31 UTC (permalink / raw)
To: Shmulik Ladkani
Cc: Artem Bityutskiy, adrian.hunter, Heinz.Egger, linux-mtd, tim.bird,
tglx
[-- Attachment #1: Type: text/plain, Size: 278 bytes --]
Am 05.06.2012 22:20, schrieb Shmulik Ladkani:
> Thanks, will retest.
>
> BTW, a UBIFS question.
> Any idea why UBIFS failed to mount eventually?
Maybe you need commit "UBI: Fastmap: Handle protection queue correctly".
Again, please use v7+. :)
Thanks,
//richard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-05 20:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-05 13:41 ubi: fastmap: v7: ubi_update_fastmap failure Shmulik Ladkani
2012-06-05 13:49 ` Richard Weinberger
2012-06-05 14:01 ` Artem Bityutskiy
2012-06-05 20:20 ` Shmulik Ladkani
2012-06-05 20:31 ` Richard Weinberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).