JFFS2 on block devices

Federico Ferreres fferreres at arrancar.com
Sun Jan 12 19:19:49 EST 2003


On Sun, 2003-01-12 at 17:43, spse at secret.org.uk wrote:
> I would definitely advise that you make a backup of your jffs2 file
> somewhere as Im not sure the latest code has been that well tested by
> others.

Good tip :) ... I witnessed two halts and one crash with latest CVS
snapshot (11/1) ...

One halt on the first to mount the fs, after issuing mount, I stopped
the process (with ctrl-z) and then sent it to the background (bg 1). At
that point the machine locked up.

After a reboot I mounted it, but starting it directly as bg process and
everything was fine. After that, I umounted it and remounted it to do
some testing. And finally, umounted it again, and the computer froze.

The last problem was a single mount, and on next umount i got this:

Unmounting loopback JFFS2 filsystem...
Unable to handle kernel paging request at virtual address 921c3912
*pde = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<cc90fc32>]    Not tainted
EFLAGS: 00010282
eax: 921c390e   ebx: 921c390e   ecx: cb529e20   edx: ffffff67
esi: c8a497a0   edi: 00000000   ebp: c7a35ccc   esp: c3eddef4
ds: 0018   es: 0018   ss: 0018
Process umount (pid: 187, stackpage=c3edd000)
Stack: c8a49680 c3eddf44 c7a35c68 00000000 cc914ac8 c7a35ccc c8a497a0
c0149d79
       c8a49680 c8a49680 c0149e04 c8a49680 c3eddf44 c3eddf44 c0149f40
c3eddf44
       c7a35c00 c7a35c44 cc919080 cc9190c4 cb516d68 c8a492c8 c013b27f
c7a35c00
Call Trace:    [<cc914ac8>] [<c0149d79>] [<c0149e04>] [<c0149f40>]
[<cc919080>]
  [<cc9190c4>] [<c013b27f>] [<c014bd16>] [<c013f2ac>] [<c014c46b>]
[<c01278c2>]
  [<c014c484>] [<c0106f73>]

Code: 8b 5b 04 50 e8 19 e1 ff ff 83 c4 04 85 db 75 ee 8b 46 24 85
 /etc/rc.d/rc.jffs2: line 35:   187 Segmentation fault      umount
$destdir
blkmtd: Device or resource busy
ioctl: LOOP_CLR_FD: Device or resource busy


The syslog always warns about (both CVS and kernel versions):

Jan 12 20:51:10 fede kernel: blkmtd: erase: invalid erase request
0x2000D @ 0x14
5E8463
Jan 12 20:51:10 fede kernel: blkmtd: erase: invalid erase request
0x2000D @ 0x14
5C8456

I suppose it's normal.

That's about it. Haven't experienced any problem after a sucessfull
mount (except when trying to umount on some cases).

My humble startup script look as follows:

<<< /etc/rc.d/rc.jffs2

#!/bin/bash
srcimage="/var/compressed/volume0"
destdir="/mnt/z01/"
action=$1
mode=$2

if [ "$2" == "ro" ] ; then
   $options=" -r "
fi

case "$action" in
start)
   echo "Mounting loopback JFFS2 filesystem ..."
   if ! grep -q mtdblock /etc/mtab ; then
      losetup /dev/loop0 $srcimage
      modprobe blkmtd device=/dev/loop0
      nice -n 19 mount -t jffs2 $options /dev/mtdblock/0 $destdir 
   fi
   EXITCODE=0
   ;;
stop)
   echo "Unmounting loopback JFFS2 filesystem..."
   umount $destdir 
   rmmod blkmtd
   losetup -d /dev/loop0
   EXITCODE=0
   ;;
restart|reload)
   $0 stop $2
   $0 start $2
   EXITCODE=$?
   ;;

esac



> 
> 
> >Regards,
> >
> >Federico
> 
> cheers
> si
> 






More information about the linux-mtd mailing list