projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix pruning to work correctly with wide Tnodes
[yaffs2.git]
/
yaffs_tagscompat.c
diff --git
a/yaffs_tagscompat.c
b/yaffs_tagscompat.c
index 1e0a1a1b195d583316b8e414e9642e80c2e779cb..e3173cc2e23b1d237928a298ef221c7829535203 100644
(file)
--- a/
yaffs_tagscompat.c
+++ b/
yaffs_tagscompat.c
@@
-170,7
+170,6
@@
static int yaffs_WriteChunkToNAND(struct yaffs_DeviceStruct *dev,
return YAFFS_FAIL;
}
return YAFFS_FAIL;
}
- dev->nPageWrites++;
return dev->writeChunkToNAND(dev, chunkInNAND, data, spare);
}
return dev->writeChunkToNAND(dev, chunkInNAND, data, spare);
}
@@
-184,8
+183,6
@@
static int yaffs_ReadChunkFromNAND(struct yaffs_DeviceStruct *dev,
int retVal;
yaffs_Spare localSpare;
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 */
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 */
@@
-408,26
+405,25
@@
int yaffs_TagsCompatabilityWriteChunkWithTagsToNAND(yaffs_Device *dev,
yaffs_SpareInitialise(&spare);
yaffs_SpareInitialise(&spare);
- if (eTags->chunkDeleted)
{
+ if (eTags->chunkDeleted)
spare.pageStatus = 0;
spare.pageStatus = 0;
-
}
else {
+ else {
tags.objectId = eTags->objectId;
tags.chunkId = eTags->chunkId;
tags.byteCountLSB = eTags->byteCount & 0x3ff;
tags.objectId = eTags->objectId;
tags.chunkId = eTags->chunkId;
tags.byteCountLSB = eTags->byteCount & 0x3ff;
- if (dev->nDataBytesPerChunk >= 1024)
{
+ if (dev->nDataBytesPerChunk >= 1024)
tags.byteCountMSB = (eTags->byteCount >> 10) & 3;
tags.byteCountMSB = (eTags->byteCount >> 10) & 3;
- } else {
+ else
tags.byteCountMSB = 3;
tags.byteCountMSB = 3;
- }
tags.serialNumber = eTags->serialNumber;
tags.serialNumber = eTags->serialNumber;
- if (!dev->useNANDECC && data)
{
+ if (!dev->useNANDECC && data)
yaffs_CalcECC(data, &spare);
yaffs_CalcECC(data, &spare);
- }
+
yaffs_LoadTagsIntoSpare(&spare, &tags);
}
yaffs_LoadTagsIntoSpare(&spare, &tags);
}