ubi_io_read error after ubiattach

Fabio Mauri fabio.mauri at bticino.it
Wed May 11 04:37:29 EDT 2011


Hi there,
  i have a problem using ubifs on a NAND flash.

I follow this procedure in order to format a MTD partition:

mkfs.ubifs -g 3 -r home/boot -m 2048 -e 129024 -c 32 -o ubifs_kernel.img
ubinize -o kernel.ubi -m 2048 -p 128KiB -s 512 ubi.cfg
ubiformat /dev/mtd3 -s 512 -f kernel.ubi
ubiattach /dev/ubi_ctrl -m 3
mount -t ubifs ubi:kernel /home/bticino/cfg/extra

ubi.cfg is:
[ubifs]
mode=ubi
image=ubifs_kernel.img
vol_id=0
vol_size=4MiB
vol_type=dynamic
vol_name=kernel
vol_flags=autoresize

and the mtdinfo output is:
mtd3
Name:                           kernel_copy
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          40 (5242880 bytes, 5.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  512 bytes
OOB size:                       64 bytes
Character device major/minor:   90:6
Bad blocks are allowed:         true
Device is writable:             true


Everything is working fine at this point.
I can successfully read/write files into the filesystem.

But if I umount the fs, detach and reattach the volume, I start to get these errors:

UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 32:512, read 512 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 2:512, read 512 bytes
UBI: run torture test for PEB 2
UBI: PEB 2 passed torture test, do not mark it a bad
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 32:512, read 512 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 2:512, read 512 bytes
UBI: run torture test for PEB 2
UBI: PEB 2 passed torture test, do not mark it a bad
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 32:512, read 512 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 2:512, read 512 bytes
UBI: run torture test for PEB 2
UBI: PEB 2 passed torture test, do not mark it a bad
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 32:512, read 512 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 2:512, read 512 bytes
UBI: run torture test for PEB 2
UBI: PEB 2 passed torture test, do not mark it a bad
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 32:512, read 512 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 2:512, read 512 bytes
UBI: run torture test for PEB 2
UBI: PEB 2 passed torture test, do not mark it a bad
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 32:512, read 512 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 2:512, read 512 bytes
UBI: run torture test for PEB 2

It makes the UBIFS very slow (not usable).. maybe I did something wrong in the procedure?

Any help would be appreciated.

Regards,
Fabio



More information about the linux-mtd mailing list