mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
yaffs: Update stats when using mtdif2.
This commit is contained in:
@@ -52,6 +52,7 @@ int nandmtd2_WriteChunkWithTagsToNAND(yaffs_Device *dev, int chunkInNAND,
|
||||
("nandmtd2_WriteChunkWithTagsToNAND chunk %d data %p tags %p"
|
||||
TENDSTR), chunkInNAND, data, tags));
|
||||
|
||||
dev->nPageWrites++;
|
||||
|
||||
addr = ((loff_t) chunkInNAND) * dev->totalBytesPerChunk;
|
||||
|
||||
@@ -115,6 +116,8 @@ int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device *dev, int chunkInNAND,
|
||||
("nandmtd2_ReadChunkWithTagsFromNAND chunk %d data %p tags %p"
|
||||
TENDSTR), chunkInNAND, data, tags));
|
||||
|
||||
dev->nPageReads++;
|
||||
|
||||
if (dev->inbandTags) {
|
||||
|
||||
if (!data) {
|
||||
@@ -174,10 +177,14 @@ int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device *dev, int chunkInNAND,
|
||||
if (localData)
|
||||
yaffs_ReleaseTempBuffer(dev, data, __LINE__);
|
||||
|
||||
if (tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR)
|
||||
if (tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR) {
|
||||
tags->eccResult = YAFFS_ECC_RESULT_UNFIXED;
|
||||
if (tags && retval == -EUCLEAN && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR)
|
||||
dev->eccUnfixed++;
|
||||
}
|
||||
if (tags && retval == -EUCLEAN && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR) {
|
||||
tags->eccResult = YAFFS_ECC_RESULT_FIXED;
|
||||
dev->eccFixed++;
|
||||
}
|
||||
if (retval == 0)
|
||||
return YAFFS_OK;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user