[prev in list] [next in list] [prev in thread] [next in thread] 

List:       yaffs
Subject:    [Yaffs] YAFFS2 inband tags
From:       Angus CLARK <angus.clark () st ! com>
Date:       2012-11-26 11:04:10
Message-ID: 50B34CAA.7000802 () st ! com
[Download RAW message or body]

Hello,

I have been trying out the inband tags option on a linux system, and my initial
attempts resulted in the following types of error when remounting:

	yaffs_verify_chunk_written: data error!
	yaffs_write_new_chunk: verify nok
	yaffs: **>> Block 3 needs retiring
	yaffs_verify_chunk_written: data error!
	yaffs_write_new_chunk: verify nok
	yaffs: **>> Block 4 needs retiring
	yaffs_verify_chunk_written: data error!

From a quick look at yaffs_mtdif.c, it seems that yaffs_mtd_read() and
yaffs_mtd_write() use a different formula for calculating the chunk address from
the 'nand_chunk' number:

yaffs_mtd_read() uses:
	addr = ((loff_t) nand_chunk) * dev->data_bytes_per_chunk;

whereas yaffs_mtd_write() uses:
	addr = ((loff_t) nand_chunk) * dev->param.total_bytes_per_chunk;

After modifying yaffs_mtd_read() to use the same method as yaffs_mtd_write(),
everything seems to work fine.

Is this a known issue, or am I doing something wrong here?

Regards,

Angus

_______________________________________________
yaffs mailing list
yaffs@lists.aleph1.co.uk
http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic