projects
/
yaffs2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5dcdf77
)
Changes to retirement handling
author
charles
<charles>
Wed, 8 Nov 2006 09:52:12 +0000
(09:52 +0000)
committer
charles
<charles>
Wed, 8 Nov 2006 09:52:12 +0000
(09:52 +0000)
yaffs_guts.c
patch
|
blob
|
history
yaffs_nand.c
patch
|
blob
|
history
diff --git
a/yaffs_guts.c
b/yaffs_guts.c
index a5e8f670a03fd48b30bb40ac37587aedf5d3efd5..f87a94a7ba76718b095b69633ea98fb2babc55ab 100644
(file)
--- a/
yaffs_guts.c
+++ b/
yaffs_guts.c
@@
-13,7
+13,7
@@
*/
const char *yaffs_guts_c_version =
*/
const char *yaffs_guts_c_version =
- "$Id: yaffs_guts.c,v 1.4
2 2006-11-08 00:33:29
charles Exp $";
+ "$Id: yaffs_guts.c,v 1.4
3 2006-11-08 09:52:12
charles Exp $";
#include "yportenv.h"
#include "yportenv.h"
@@
-484,13
+484,15
@@
static int yaffs_WriteNewChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev,
static void yaffs_RetireBlock(yaffs_Device * dev, int blockInNAND)
{
static void yaffs_RetireBlock(yaffs_Device * dev, int blockInNAND)
{
+ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, blockInNAND);
yaffs_InvalidateCheckpoint(dev);
yaffs_MarkBlockBad(dev, blockInNAND);
yaffs_InvalidateCheckpoint(dev);
yaffs_MarkBlockBad(dev, blockInNAND);
- yaffs_GetBlockInfo(dev, blockInNAND)->blockState =
- YAFFS_BLOCK_STATE_DEAD;
+ bi->blockState = YAFFS_BLOCK_STATE_DEAD;
+ bi->gcPrioritise = 0;
+ bi->needsRetiring = 0;
dev->nRetiredBlocks++;
}
dev->nRetiredBlocks++;
}
@@
-2054,15
+2056,15
@@
static int yaffs_FindBlockForGarbageCollection(yaffs_Device * dev,
for(i = dev->internalStartBlock; i < dev->internalEndBlock && !prioritised; i++){
bi = yaffs_GetBlockInfo(dev, i);
for(i = dev->internalStartBlock; i < dev->internalEndBlock && !prioritised; i++){
bi = yaffs_GetBlockInfo(dev, i);
- if(bi->gcPrioritise)
+ if(bi->gcPrioritise)
{
pendingPrioritisedExist = 1;
pendingPrioritisedExist = 1;
- if(bi->blockState == YAFFS_BLOCK_STATE_FULL &&
- bi->gcPrioritise &&
- yaffs_BlockNotDisqualifiedFromGC(dev, bi)){
-
pagesInUse = (bi->pagesInUse - bi->softDeletions)
;
-
dirtiest = i
;
- prioritised = 1;
- aggressive = 1; /* Fool the non-aggressive skip logiv below */
+
if(bi->blockState == YAFFS_BLOCK_STATE_FULL &&
+ yaffs_BlockNotDisqualifiedFromGC(dev, bi)){
+ pagesInUse = (bi->pagesInUse - bi->softDeletions);
+
dirtiest = i
;
+
prioritised = 1
;
+ aggressive = 1; /* Fool the non-aggressive skip logiv below */
+ }
}
}
}
}
diff --git
a/yaffs_nand.c
b/yaffs_nand.c
index 8c4f639a481e0d929c021af1db5bd0dbfba52e0a..14ae3308a79333f419d5ae6e5800237c2b5e77b2 100644
(file)
--- a/
yaffs_nand.c
+++ b/
yaffs_nand.c
@@
-13,7
+13,7
@@
*/
const char *yaffs_nand_c_version =
*/
const char *yaffs_nand_c_version =
- "$Id: yaffs_nand.c,v 1.
4 2006-10-13 08:52:49
charles Exp $";
+ "$Id: yaffs_nand.c,v 1.
5 2006-11-08 09:52:12
charles Exp $";
#include "yaffs_nand.h"
#include "yaffs_tagscompat.h"
#include "yaffs_nand.h"
#include "yaffs_tagscompat.h"
@@
-123,9
+123,6
@@
int yaffs_EraseBlockInNAND(struct yaffs_DeviceStruct *dev,
dev->nBlockErasures++;
result = dev->eraseBlockInNAND(dev, blockInNAND);
dev->nBlockErasures++;
result = dev->eraseBlockInNAND(dev, blockInNAND);
- /* If at first we don't succeed, try again *once*.*/
- if (!result)
- result = dev->eraseBlockInNAND(dev, blockInNAND);
return result;
}
return result;
}