UBIFS error CRC calculation on avr32 CPU

Artem Bityutskiy dedekind at infradead.org
Wed Dec 3 04:25:25 EST 2008


On Wed, 2008-12-03 at 08:55 +0100, Eirik Aanonsen wrote:
> > It looks like you indeed have corrupted data. Where the 'wpr_004.wfp'
> > file comes from? You wrote it previously? Or you used mkfs.ubifs?
> > 
> The file is a binary file from my system. And the file has been checked for integrity before being copied over to the ubifs file system.

OK.

> Wpr_004.wfp originates from a vfat partition, and was moved along with 10 other files, and then when I try to move the file back out from ubifs the read error occurs.

OK, this means that the file had not been correctly written to UBIFS.
Your NAND driver may have problems. The fact that you use NAND flash
with 4KiB page size also suggests this, because AFAIK MTD does not
really support 4KiB per page NANDs. You probably have some custom MTD
diver/modifications.

Could you please verify your NAND driver before trying to use UBIFS?
Here you may get NAND tests which should do this:

git://git.infradead.org/users/ahunter/nand-tests.git

The tests are kernel modules. Compile them properly, then just insert
them, may be with some parameters. Use modinfo to see the parameters,
or look at the source code. All tests are harmless, except of torture
test - be careful with it.

Note, these tests has not been run on 4KiB-page NANDs, but they should
work fine anyway.

Could you please tell which NAND hardware you have? Is it SLC or MLC?

> > Also, did you try to enable UBIFS and UBI extra self-checks? Please,
> > try. Things will become very slow then, though, but this may give
> > some useful information.
> 
> Here are the result after enabling these two options.

I see. Basically, you have broken nodes on your flash media, which means
your files have not been written correctly for some reasons. For now I
suspect buggy NAND driver.

> How do I do cleaning in ubifs?

Well, in _normal_ situations you should not need this at all, and UBIFS
is self-recoverable. In your case you have some severe problems so you
have data corruptions which you cannot recover anyway. You may only
delete the corrupted files.

But yes, an ckfs.ubifs user-space utility would be nice to have, and we
were thinking to create it. At the moment, it does not exist.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list