*/
const char *yaffs_checkptrw_c_version =
- "$Id: yaffs_checkptrw.c,v 1.19 2009-06-19 01:35:46 charles Exp $";
+ "$Id: yaffs_checkptrw.c,v 1.20 2009-09-09 03:03:01 charles Exp $";
#include "yaffs_checkptrw.h"
yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, i);
if (bi->blockState == YAFFS_BLOCK_STATE_CHECKPOINT) {
T(YAFFS_TRACE_CHECKPOINT, (TSTR("erasing checkpt block %d"TENDSTR), i));
+
+ dev->nBlockErasures++;
+
if (dev->eraseBlockInNAND(dev, i - dev->blockOffset /* realign */)) {
bi->blockState = YAFFS_BLOCK_STATE_EMPTY;
dev->nErasedBlocks++;
realignedChunk = chunk - dev->chunkOffset;
+ dev->nPageWrites++;
+
dev->writeChunkWithTagsToNAND(dev, realignedChunk,
dev->checkpointBuffer, &tags);
dev->checkpointByteOffset = 0;
dev->checkpointCurrentChunk;
realignedChunk = chunk - dev->chunkOffset;
+
+ dev->nPageReads++;
/* read in the next chunk */
/* printf("read checkpoint page %d\n",dev->checkpointPage); */
/* Don't compile this module if we don't have MTD's mtd_oob_ops interface */
#if (MTD_VERSION_CODE > MTD_VERSION(2, 6, 17))
-const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.10 2009-03-09 07:41:10 charles Exp $";
+const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.11 2009-09-09 03:03:01 charles Exp $";
#ifndef CONFIG_YAFFS_9BYTE_TAGS
# define YTAG1_SIZE 8
compile_time_assertion(sizeof(yaffs_PackedTags1) == 12);
compile_time_assertion(sizeof(yaffs_Tags) == 8);
- dev->nPageWrites++;
-
yaffs_PackTags1(&pt1, etags);
yaffs_CalcTagsECC((yaffs_Tags *)&pt1);
int retval;
int deleted;
- dev->nPageReads++;
-
memset(&ops, 0, sizeof(ops));
ops.mode = MTD_OOB_AUTO;
ops.len = (data) ? chunkBytes : 0;
*/
const char *yaffs_nand_c_version =
- "$Id: yaffs_nand.c,v 1.10 2009-03-06 17:20:54 wookey Exp $";
+ "$Id: yaffs_nand.c,v 1.11 2009-09-09 03:03:01 charles Exp $";
#include "yaffs_nand.h"
#include "yaffs_tagscompat.h"
int realignedChunkInNAND = chunkInNAND - dev->chunkOffset;
+ dev->nPageReads++;
+
/* If there are no tags provided, use local tags to get prioritised gc working */
if (!tags)
tags = &localTags;
const __u8 *buffer,
yaffs_ExtendedTags *tags)
{
+
+ dev->nPageWrites++;
+
chunkInNAND -= dev->chunkOffset;
{
blockNo -= dev->blockOffset;
-;
+
if (dev->markNANDBlockBad)
return dev->markNANDBlockBad(dev, blockNo);
else
blockInNAND -= dev->blockOffset;
-
dev->nBlockErasures++;
+
result = dev->eraseBlockInNAND(dev, blockInNAND);
return result;
return YAFFS_FAIL;
}
- dev->nPageWrites++;
return dev->writeChunkToNAND(dev, chunkInNAND, data, spare);
}
int retVal;
yaffs_Spare localSpare;
- dev->nPageReads++;
-
if (!spare && data) {
/* If we don't have a real spare, then we use a local one. */
/* Need this for the calculation of the ecc */