Failure on MTD sub-page test

Artem Bityutskiy dedekind1 at gmail.com
Fri Oct 14 05:41:23 PDT 2016


On Tue, 2016-10-11 at 11:11 +0000, Danesh Daroui wrote:
> Hello,
> 
> We are using UBIFS which is shipped with the Kernel 2.6.39.4 on a
> NAND Flash memory. When I run "mtd_debug info /dev/mtd0" following
> info are shown:
> 
> mtd.type = MTD_NANDFLASH
> mtd.flags = MTD_CAP_NANDFLASH
> mtd.size = 1073741824 (1G)
> mtd.erasesize = 524288 (512K)
> mtd.writesize = 4096 (4K)
> mtd.oobsize = 128
> regions = 0
> 
> Now the problem is that when I run mtd tests, only read and NAND ECC
> tests are passed. Then all other tests fail on exactly page 21. For
> instance this is the output when I run page test:

If mtd tests do not work, you need to focus on your MTD drivers and fix
them.

> =================================================
> mtd_subpagetest: MTD device: 0
> mtd_subpagetest: MTD device size 1073741824, eraseblock size 524288,
> page size 4096, subpage size 1024, count of eraseblocks 2048, pages 
... snip ...
> mtd_subpagetest: verified up to eraseblock 1280
> mtd_subpagetest: verified up to eraseblock 1536
> mtd_subpagetest: verified up to eraseblock 1792
> UBIFS error (pid 4243): ubifs_read_node: bad node type (255 but
> expected 1)
> UBIFS error (pid 4243): ubifs_read_node: bad node at LEB 30:98088,
> LEB mapping status 1
> UBIFS error (pid 4243): do_readpage: cannot read page 21 of inode
> 791, error -22

This is a bit confusing - why messages go together. Do you run mtd
tests and also have the same mtd device mounted at the same time?

The tests hammer the MTD device directly, they do not go through
UBI/UBIFS. So make sure UBI/UBIFS are not using the MTD device that you
are testing.

Artem.




More information about the linux-mtd mailing list