A question about fsdata_pos and fsdata_len

zhao forrest zhao_fusheng at hotmail.com
Tue Sep 13 06:24:21 EDT 2005


Hi,

I'm not sure if it's a bug, so send out this mail to confirm.

1 In jffs2_nand_set_oobinfo():
c->fsdata_pos = oinfo->oobfree[0][0];
c->fsdata_len = oinfo->oobfree[0][1];
2 In line 88 of nand_base.c
static struct nand_oobinfo nand_oob_8 = {
	.useecc = MTD_NANDECC_AUTOPLACE,
	.eccbytes = 3,
	.eccpos = {0, 1, 2},
	.oobfree = { {3, 2}, {6, 2} }
};
so for this kind of NAND flash, c->fsdata_len is 2.
3 but in jffs2_write_nand_cleanmarker(), it's assumed that
c->fsdata_len is at least 8
n.totlen = cpu_to_je32(8);

I want to know if it's a problem, or I missed something?

Thanks,
Forrest






More information about the linux-mtd mailing list