[Yaffs] YAFFS2 inband tags

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Angus CLARK
Date:  
To: yaffs
Subject: [Yaffs] YAFFS2 inband tags
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