public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* problem mounting a jffs2 filesystem
@ 2006-03-05 13:04 Miguel Blanco
  2006-03-06 13:28 ` Josh Boyer
  2006-03-06 13:35 ` David Woodhouse
  0 siblings, 2 replies; 6+ messages in thread
From: Miguel Blanco @ 2006-03-05 13:04 UTC (permalink / raw)
  To: linux-kernel

Hello,

 Trying to mount a jffs2 file system in my desktop PC:
 ...
 $ modprobe mtdram total_size=6144 erase_size=128
 $ modprobe mtdblock
 ...
 $ dd if=fw.wsw of=data.jffs2 ibs=1 obs=1M count=5888K skip=6292872
 $ jffs2dump -b -c -e data-le.jffs2 data.jffs2
 $ dd if=data-le.jffs2 of=/dev/mtdblock0
 $ mkdir data
 $ mount -t jffs2 /dev/mtdblock0 data

 I get a mount error:
     "2942 Violación de segmento" (in spanish and "segment violation"
in english :-) )

 and dmesg says (relevant part I think):

 divide error: 0000 [#1]
 last sysfs file: /block/mtdblock0/dev
 Modules linked in: jffs2 zlib_deflate mtdblock mtd_blkdevs mtdram
mtdpart mtdcor e parport_pc lp parport autofs4 dm_mod video button
battery ac ipv6 ohci1394 iee e1394 uhci_hcd ehci_hcd i2c_i801 i2c_core
snd_intel8x0 snd_ac97_codec snd_ac97_b us snd_seq_dummy snd_seq_oss
snd_seq_midi_event snd_seq snd_seq_device snd_pcm_o ss snd_mixer_oss
snd_pcm snd_timer snd soundcore snd_page_alloc 8139cp 8139too m ii
floppy sr_mod ext3 jbd aic7xxx scsi_transport_spi sd_mod scsi_mod
 CPU:    0
 EIP:    0060:[<e118deef>]    Not tainted VLI
 EFLAGS: 00210246   (2.6.15-1.1830_FC4)
 EIP is at jffs2_scan_medium+0xdf/0x55e [jffs2]
 eax: 0000fff4   ebx: d2c5fa00   ecx: dffef180   edx: 00000000
 esi: d07d24e0   edi: d07d28d0   ebp: d3c98a80   esp: d0995d80
 ds: 007b   es: 007b   ss: 0068
 Process mount (pid: 2942, threadinfo=d0995000 task=d311b030)
 Stack: 00000000 d3c98a80 d0995da4 00000080 00000030 00000002 00000000 00000000
        00600000 e0b58000 d2c5fa00 00000030 d2c5fa00 00000000 e119107a d2c5fa00
        d3c98338 fffffff4 c0152c19 ffffffff e119611d 000000d0 00000000 d2c5fa00
 Call Trace:
  [<e119107a>] jffs2_build_filesystem+0x1a
/0x306 [jffs2]     [<c0152c19>] __vmall oc+0xf/0x13
  [<e119611d>] jffs2_sum_init+0x3d/0xbf [jffs2]     [<e1191609>]
jffs2_do_mount_f s+0x1cc/0x233 [jffs2]
  [<e119300c>] jffs2_do_fill_super+0xa8/0x1cb [jffs2]     [<e1193647>]
jffs2_sb_s et+0x0/0x1d [jffs2]
  [<e119385f>] jffs2_get_sb_mtd+0x1fb/0x22c [jffs2]     [<e11939b5>]
jffs2_get_sb +0xe7/0x192 [jffs2]
  [<c017502b>] alloc_vfsmnt+0x9b/0xc2     [<c0174f79>] get_fs_type+0x8d/0xa4
  [<c0161d29>] do_kern_mount+0xaf/0x147     [<c0176437>] do_new_mount+0x6b/0x90
  [<c0176a37>] do_mount+0x1b1/0x1cc     [<c01422e0>] __alloc_pages+0x57/0x2ed
  [<c017683d>] copy_mount_options+0x4d/0x96     [<c0176db4>] sys_mount+0x72/0xa4
  [<c0102e75>] syscall_call+0x7/0xb
 Code: 8b 93 b0 00 00 00 8b 42 18 01 43 7c 8b 43 78 2b 42 18 89 43 78
c7 42 18 00  00 00 00 8b b3 b0 00 00 00 85 f6 74 24 8b 46 20 31 d2
<f7> b3 84 01 00 00 85 d2  74 15 01 56 1c 01 53 7c 8b 83 b0 00 00
 Continuing in 1 seconds.
  <6>loop: loaded (max 8 devices)


 this is with Fedora 4 kernel 2.6.15-1.1830 (and later kernels).
2.6.14.1.1656 is OK!

 I know is a vendor kernel, but the 2.6.15 ChangeLog contains a lot of
changes related
 to mtd devices and jffs2 filesystems, so I think it could be a mainline bug.

 Let me know if you need more information.

 Thank you,
 Miguel.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: problem mounting a jffs2 filesystem
  2006-03-05 13:04 problem mounting a jffs2 filesystem Miguel Blanco
@ 2006-03-06 13:28 ` Josh Boyer
  2006-03-06 13:35 ` David Woodhouse
  1 sibling, 0 replies; 6+ messages in thread
From: Josh Boyer @ 2006-03-06 13:28 UTC (permalink / raw)
  To: Miguel Blanco; +Cc: linux-kernel, MTD mailing list

On 3/5/06, Miguel Blanco <mblancom@gmail.com> wrote:
> Hello,
>
>  Trying to mount a jffs2 file system in my desktop PC:
>  ...
>  $ modprobe mtdram total_size=6144 erase_size=128
>  $ modprobe mtdblock
>  ...
>  $ dd if=fw.wsw of=data.jffs2 ibs=1 obs=1M count=5888K skip=6292872
>  $ jffs2dump -b -c -e data-le.jffs2 data.jffs2
>  $ dd if=data-le.jffs2 of=/dev/mtdblock0
>  $ mkdir data
>  $ mount -t jffs2 /dev/mtdblock0 data
>
>  I get a mount error:
>      "2942 Violación de segmento" (in spanish and "segment violation"
> in english :-) )
>
>  and dmesg says (relevant part I think):
>
>  divide error: 0000 [#1]
>  last sysfs file: /block/mtdblock0/dev
>  Modules linked in: jffs2 zlib_deflate mtdblock mtd_blkdevs mtdram
> mtdpart mtdcor e parport_pc lp parport autofs4 dm_mod video button
> battery ac ipv6 ohci1394 iee e1394 uhci_hcd ehci_hcd i2c_i801 i2c_core
> snd_intel8x0 snd_ac97_codec snd_ac97_b us snd_seq_dummy snd_seq_oss
> snd_seq_midi_event snd_seq snd_seq_device snd_pcm_o ss snd_mixer_oss
> snd_pcm snd_timer snd soundcore snd_page_alloc 8139cp 8139too m ii
> floppy sr_mod ext3 jbd aic7xxx scsi_transport_spi sd_mod scsi_mod
>  CPU:    0
>  EIP:    0060:[<e118deef>]    Not tainted VLI
>  EFLAGS: 00210246   (2.6.15-1.1830_FC4)
>  EIP is at jffs2_scan_medium+0xdf/0x55e [jffs2]
>  eax: 0000fff4   ebx: d2c5fa00   ecx: dffef180   edx: 00000000
>  esi: d07d24e0   edi: d07d28d0   ebp: d3c98a80   esp: d0995d80
>  ds: 007b   es: 007b   ss: 0068
>  Process mount (pid: 2942, threadinfo=d0995000 task=d311b030)
>  Stack: 00000000 d3c98a80 d0995da4 00000080 00000030 00000002 00000000 00000000
>         00600000 e0b58000 d2c5fa00 00000030 d2c5fa00 00000000 e119107a d2c5fa00
>         d3c98338 fffffff4 c0152c19 ffffffff e119611d 000000d0 00000000 d2c5fa00
>  Call Trace:
>   [<e119107a>] jffs2_build_filesystem+0x1a
> /0x306 [jffs2]     [<c0152c19>] __vmall oc+0xf/0x13
>   [<e119611d>] jffs2_sum_init+0x3d/0xbf [jffs2]     [<e1191609>]
> jffs2_do_mount_f s+0x1cc/0x233 [jffs2]
>   [<e119300c>] jffs2_do_fill_super+0xa8/0x1cb [jffs2]     [<e1193647>]
> jffs2_sb_s et+0x0/0x1d [jffs2]
>   [<e119385f>] jffs2_get_sb_mtd+0x1fb/0x22c [jffs2]     [<e11939b5>]
> jffs2_get_sb +0xe7/0x192 [jffs2]
>   [<c017502b>] alloc_vfsmnt+0x9b/0xc2     [<c0174f79>] get_fs_type+0x8d/0xa4
>   [<c0161d29>] do_kern_mount+0xaf/0x147     [<c0176437>] do_new_mount+0x6b/0x90
>   [<c0176a37>] do_mount+0x1b1/0x1cc     [<c01422e0>] __alloc_pages+0x57/0x2ed
>   [<c017683d>] copy_mount_options+0x4d/0x96     [<c0176db4>] sys_mount+0x72/0xa4
>   [<c0102e75>] syscall_call+0x7/0xb
>  Code: 8b 93 b0 00 00 00 8b 42 18 01 43 7c 8b 43 78 2b 42 18 89 43 78
> c7 42 18 00  00 00 00 8b b3 b0 00 00 00 85 f6 74 24 8b 46 20 31 d2
> <f7> b3 84 01 00 00 85 d2  74 15 01 56 1c 01 53 7c 8b 83 b0 00 00
>  Continuing in 1 seconds.
>   <6>loop: loaded (max 8 devices)
>
>
>  this is with Fedora 4 kernel 2.6.15-1.1830 (and later kernels).
> 2.6.14.1.1656 is OK!
>
>  I know is a vendor kernel, but the 2.6.15 ChangeLog contains a lot of
> changes related
>  to mtd devices and jffs2 filesystems, so I think it could be a mainline bug.
>
>  Let me know if you need more information.

You should CC the MTD mailing list as well.  They might be able to
help you a bit more.

josh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: problem mounting a jffs2 filesystem
  2006-03-05 13:04 problem mounting a jffs2 filesystem Miguel Blanco
  2006-03-06 13:28 ` Josh Boyer
@ 2006-03-06 13:35 ` David Woodhouse
  2006-03-07  1:15   ` Miguel Blanco
  2006-03-08 22:07   ` Adrian Bunk
  1 sibling, 2 replies; 6+ messages in thread
From: David Woodhouse @ 2006-03-06 13:35 UTC (permalink / raw)
  To: Miguel Blanco; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 225 bytes --]

On Sun, 2006-03-05 at 14:04 +0100, Miguel Blanco wrote:
>  divide error: 0000 [#1]
>  EIP is at jffs2_scan_medium+0xdf/0x55e [jffs2]

Can you try it with the attached patch? Or turn off
CONFIG_JFFS2_FS_WRITEBUFFER

-- 
dwmw2

[-- Attachment #2: Attached message - mtd/fs/jffs2 scan.c,1.134,1.135 --]
[-- Type: message/rfc822, Size: 3388 bytes --]

From: David Woodhouse <dwmw2@infradead.org>
To: linux-mtd-cvs@lists.infradead.org
Subject: mtd/fs/jffs2 scan.c,1.134,1.135
Date: Thu, 09 Feb 2006 16:13:01 +0000
Message-ID: <E1F7EPl-0007Vk-PT@phoenix.infradead.org>

Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv28853

Modified Files:
	scan.c 
Log Message:
Avoid divide-by-zero

Index: scan.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/scan.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -r1.134 -r1.135
--- scan.c	13 Jan 2006 10:25:29 -0000	1.134
+++ scan.c	9 Feb 2006 16:12:59 -0000	1.135
@@ -239,7 +239,7 @@
 		c->nextblock->dirty_size = 0;
 	}
 #ifdef CONFIG_JFFS2_FS_WRITEBUFFER
-	if (!jffs2_can_mark_obsolete(c) && c->nextblock && (c->nextblock->free_size % c->wbuf_pagesize)) {
+	if (!jffs2_can_mark_obsolete(c) && c->wbuf_pagesize && c->nextblock && (c->nextblock->free_size % c->wbuf_pagesize)) {
 		/* If we're going to start writing into a block which already
 		   contains data, and the end of the data isn't page-aligned,
 		   skip a little and align it. */


__________________________________________________________
Linux-MTD CVS commit list
http://lists.infradead.org/mailman/listinfo/linux-mtd-cvs/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: problem mounting a jffs2 filesystem
  2006-03-06 13:35 ` David Woodhouse
@ 2006-03-07  1:15   ` Miguel Blanco
  2006-03-08 22:07   ` Adrian Bunk
  1 sibling, 0 replies; 6+ messages in thread
From: Miguel Blanco @ 2006-03-07  1:15 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-kernel

Yes, It works now with the patch !!!

Thank you.

Miguel.

2006/3/6, David Woodhouse <dwmw2@infradead.org>:
> On Sun, 2006-03-05 at 14:04 +0100, Miguel Blanco wrote:
> >  divide error: 0000 [#1]
> >  EIP is at jffs2_scan_medium+0xdf/0x55e [jffs2]
>
> Can you try it with the attached patch? Or turn off
> CONFIG_JFFS2_FS_WRITEBUFFER
>
> --
> dwmw2
>
>
>
> ---------- Mensaje reenviado ----------
> From: David Woodhouse <dwmw2@infradead.org>
> To: linux-mtd-cvs@lists.infradead.org
> Date: Thu, 09 Feb 2006 16:13:01 +0000
> Subject: mtd/fs/jffs2 scan.c,1.134,1.135
> Update of /home/cvs/mtd/fs/jffs2
> In directory phoenix.infradead.org:/tmp/cvs-serv28853
>
> Modified Files:
>         scan.c
> Log Message:
> Avoid divide-by-zero
>
> Index: scan.c
> ===================================================================
> RCS file: /home/cvs/mtd/fs/jffs2/scan.c,v
> retrieving revision 1.134
> retrieving revision 1.135
> diff -u -r1.134 -r1.135
> --- scan.c      13 Jan 2006 10:25:29 -0000      1.134
> +++ scan.c      9 Feb 2006 16:12:59 -0000       1.135
> @@ -239,7 +239,7 @@
>                 c->nextblock->dirty_size = 0;
>         }
>  #ifdef CONFIG_JFFS2_FS_WRITEBUFFER
> -       if (!jffs2_can_mark_obsolete(c) && c->nextblock && (c->nextblock->free_size % c->wbuf_pagesize)) {
> +       if (!jffs2_can_mark_obsolete(c) && c->wbuf_pagesize && c->nextblock && (c->nextblock->free_size % c->wbuf_pagesize)) {
>                 /* If we're going to start writing into a block which already
>                    contains data, and the end of the data isn't page-aligned,
>                    skip a little and align it. */
>
>
> __________________________________________________________
> Linux-MTD CVS commit list
> http://lists.infradead.org/mailman/listinfo/linux-mtd-cvs/
>
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: problem mounting a jffs2 filesystem
  2006-03-06 13:35 ` David Woodhouse
  2006-03-07  1:15   ` Miguel Blanco
@ 2006-03-08 22:07   ` Adrian Bunk
  2006-03-09  2:18     ` Josh Boyer
  1 sibling, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2006-03-08 22:07 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Miguel Blanco, linux-kernel

On Mon, Mar 06, 2006 at 01:35:31PM +0000, David Woodhouse wrote:
> On Sun, 2006-03-05 at 14:04 +0100, Miguel Blanco wrote:
> >  divide error: 0000 [#1]
> >  EIP is at jffs2_scan_medium+0xdf/0x55e [jffs2]
> 
> Can you try it with the attached patch? Or turn off
> CONFIG_JFFS2_FS_WRITEBUFFER

This patch seems to be 2.61.6 stuff?

> dwmw2
>...

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: problem mounting a jffs2 filesystem
  2006-03-08 22:07   ` Adrian Bunk
@ 2006-03-09  2:18     ` Josh Boyer
  0 siblings, 0 replies; 6+ messages in thread
From: Josh Boyer @ 2006-03-09  2:18 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: David Woodhouse, Miguel Blanco, linux-kernel

On 3/8/06, Adrian Bunk <bunk@stusta.de> wrote:
> On Mon, Mar 06, 2006 at 01:35:31PM +0000, David Woodhouse wrote:
> > On Sun, 2006-03-05 at 14:04 +0100, Miguel Blanco wrote:
> > >  divide error: 0000 [#1]
> > >  EIP is at jffs2_scan_medium+0xdf/0x55e [jffs2]
> >
> > Can you try it with the attached patch? Or turn off
> > CONFIG_JFFS2_FS_WRITEBUFFER
>
> This patch seems to be 2.61.6 stuff?

I would agree that it could be 2.6.16 material.  Especially given that
it fixes a know problem for a user.  David?

josh

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-03-09  2:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-05 13:04 problem mounting a jffs2 filesystem Miguel Blanco
2006-03-06 13:28 ` Josh Boyer
2006-03-06 13:35 ` David Woodhouse
2006-03-07  1:15   ` Miguel Blanco
2006-03-08 22:07   ` Adrian Bunk
2006-03-09  2:18     ` Josh Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox