Problem of "JFFS2 summary"
Alexander Belyakov
alexander.belyakov at intel.com
Tue Apr 18 04:06:22 EDT 2006
Ferenc Havasi wrote:
>
> You are right. It was a forgatten code. We removed it with a patch
> commited now.
>
> Thanks!
>
> Ferenc
>
Ferenc, I have just looked at Centralized summary patch. It seems it is
good idea to add check c->mtd->block_isbad against NULL before call in
jffs2_cs_build_filesystem_jeb() function. I understand that your patch
at the moment is for NAND only but someone, for example, may have rootfs
on NOR where block_isbad() method is not provided. Adding that check you
will just get message "...cs_block is not valid..." for JFFS2 at NOR,
otherwise Kernel panic.
.......
int jffs2_cs_build_filesystem_jeb(struct jffs2_sb_info *c)
{
int i, ret;
uint32_t offset;
for (i=0; i < CENT_SUM_RETRY_EMPTY; i++) {
offset = c->blocks[i]->offset;
if(c->mtd->block_isbad) {
if (c->mtd->block_isbad(c->mtd, offset) == 2) {
dbg_cs2("Erase block #%d (offset 0x08%x) is bad! Skip", i, offset);
continue;
}
}
.......
Thanks,
Alexander Belyakov
-------
The content of this message is my personal opinion only and although I
am an employee of Intel, the statements I make here in no way represent
Intel’s position on the issue
**
More information about the linux-mtd
mailing list