From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-px0-f184.google.com ([209.85.216.184]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1Njixg-00065r-JD for linux-mtd@lists.infradead.org; Tue, 23 Feb 2010 00:49:20 +0000 Received: by pxi14 with SMTP id 14so1612969pxi.15 for ; Mon, 22 Feb 2010 16:49:14 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1266308748.11659.183.camel@localhost> References: <1266308748.11659.183.camel@localhost> Date: Mon, 22 Feb 2010 16:49:13 -0800 Message-ID: Subject: Re: ubifs errors for BeagleBoard From: Shivdas Gujare To: dedekind1@gmail.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: beagleboard@googlegroups.com, linux-mtd@lists.infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Artem, Thanks a lot for your help. On Tue, Feb 16, 2010 at 12:25 AM, Artem Bityutskiy wr= ote: > On Mon, 2010-02-15 at 00:53 -0800, Shivdas Gujare wrote: >> Hi All, > > Good morning, > >> I am trying to use UBIFS on Omap3 BeagleBoard (kernel version 2.6.33) >> I am quite new to flash filesystems & ubifs. >> >> currently for ubiattach I am getting following error, >> >> uncorrectable error : >> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB >> 198:512, read 512 bytes >> [] (unwind_backtrace+0x0/0xdc) from [] >> (ubi_io_read+0x20c/0x2ec) >> [] (ubi_io_read+0x20c/0x2ec) from [] >> (ubi_io_read_vid_hdr+0x94/0x294) >> [] (ubi_io_read_vid_hdr+0x94/0x294) from [] >> (ubi_scan+0xa50/0x1094) >> [] (ubi_scan+0xa50/0x1094) from [] >> (ubi_attach_mtd_dev+0x624/0xd6c) >> [] (ubi_attach_mtd_dev+0x624/0xd6c) from [] >> (ctrl_cdev_ioctl+0xe8/0x1a4) >> [] (ctrl_cdev_ioctl+0xe8/0x1a4) from [] >> (vfs_ioctl+0x2c/0x70) >> [] (vfs_ioctl+0x2c/0x70) from [] (do_vfs_ioctl+0x518= /0x55c) >> [] (do_vfs_ioctl+0x518/0x55c) from [] (sys_ioctl+0x3= 4/0x54) >> [] (sys_ioctl+0x34/0x54) from [] (ret_fast_syscall+0= x0/0x2c) > > -74 is -EBADMSG, which means an non-correctable ECC error. I am very much newbie to mtd & flash's, Do you mean this is a non-correctable error caused by hardware? > >> >> and for "mount -t ubifs /dev/ubi0_0 /mnt" it gives following error, >> >> uncorrectable error : >> UBI error: ubi_io_read: error -74 while reading 188 bytes from PEB >> 220:8304, read 188 bytes >> [] (unwind_backtrace+0x0/0xdc) from [] >> (ubi_io_read+0x20c/0x2ec) >> [] (ubi_io_read+0x20c/0x2ec) from [] >> (ubi_eba_read_leb+0x2e4/0x3e8) >> [] (ubi_eba_read_leb+0x2e4/0x3e8) from [] >> (ubi_leb_read+0x100/0x15c) >> [] (ubi_leb_read+0x100/0x15c) from [] >> (ubifs_read_node+0x1b4/0x340) >> [] (ubifs_read_node+0x1b4/0x340) from [] >> (ubifs_load_znode+0xd0/0x5c0) >> [] (ubifs_load_znode+0xd0/0x5c0) from [] >> (ubifs_lookup_level0+0x114/0x2dc) >> [] (ubifs_lookup_level0+0x114/0x2dc) from [] >> (ubifs_tnc_locate+0x40/0x170) >> [] (ubifs_tnc_locate+0x40/0x170) from [] >> (ubifs_iget+0xb0/0x7e4) >> [] (ubifs_iget+0xb0/0x7e4) from [] >> (ubifs_fill_super+0x15d4/0x1664) >> [] (ubifs_fill_super+0x15d4/0x1664) from [] >> (ubifs_get_sb+0x288/0x2fc) >> [] (ubifs_get_sb+0x288/0x2fc) from [] >> (vfs_kern_mount+0x4c/0xd0) >> [] (vfs_kern_mount+0x4c/0xd0) from [] >> (do_kern_mount+0x34/0xd8) >> [] (do_kern_mount+0x34/0xd8) from [] (do_mount+0x5ec= /0x64c) >> [] (do_mount+0x5ec/0x64c) from [] (sys_mount+0x84/0x= c4) >> [] (sys_mount+0x84/0xc4) from [] (ret_fast_syscall+0= x0/0x2c) > > The same symptoms. > >> Does anyone encountered similar kind of error? > Yes in general, dunno if for beagleboard. > > Please, start with validating your flash using mtd-tests. You have > issues somewhere on the NAND driver level. Please, find the tests here: > > http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests Thanks for pointers, I will follow the tests. > >> Also would like to know, does user space - ubitools read only 64 bytes >> each from mtd drivers(while scan or format) > > Yes. This is a major stopper for me right now, If ubitools read only 64 bytes from mtd driver, then how does it handled with when nand page size is 2048. My mtd driver has a check of if ( (ops->len % mtd->writesize) !=3D 0) ) { printk("%s: : unsupported ops->len, %d\n", __FUNCTION__, ops->len); return -EINVAL; } So in above case, "ops->len" is set to 64 while ubi "scanning" due to read of "struct ubi_ec_hdr" & "mtd->writesize" is set to "2048" so, it always fails while scanning. Since my MTD knowledge is very limited, I am not sure how this interfacing happens..Am I missing anything? Thanks a lot for your help. Thanks and Regards, Shivdas Gujare > > -- > Best Regards, > Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9) > >