projects
/
yaffs2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f915693
)
Update tags when rewriting object header during gc
author
charles
<charles>
Thu, 11 Mar 2010 02:44:43 +0000
(
02:44
+0000)
committer
charles
<charles>
Thu, 11 Mar 2010 02:44:43 +0000
(
02:44
+0000)
yaffs_guts.c
patch
|
blob
|
history
diff --git
a/yaffs_guts.c
b/yaffs_guts.c
index 1ad630b8a9f4e3c26cc3527717cea0fc9c109bdb..7fc606d7c579639425b1365a68fec310569eade0 100644
(file)
--- a/
yaffs_guts.c
+++ b/
yaffs_guts.c
@@
-12,7
+12,7
@@
*/
const char *yaffs_guts_c_version =
*/
const char *yaffs_guts_c_version =
- "$Id: yaffs_guts.c,v 1.11
6 2010-03-09 04:12:00
charles Exp $";
+ "$Id: yaffs_guts.c,v 1.11
7 2010-03-11 02:44:43
charles Exp $";
#include "yportenv.h"
#include "yaffs_trace.h"
#include "yportenv.h"
#include "yaffs_trace.h"
@@
-3342,14
+3342,20
@@
static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
yaffs_ObjectHeader *oh;
oh = (yaffs_ObjectHeader *)buffer;
yaffs_ObjectHeader *oh;
oh = (yaffs_ObjectHeader *)buffer;
+
oh->isShrink = 0;
tags.extraIsShrinkHeader = 0;
oh->isShrink = 0;
tags.extraIsShrinkHeader = 0;
+
oh->shadowsObject = 0;
oh->inbandShadowsObject = 0;
oh->shadowsObject = 0;
oh->inbandShadowsObject = 0;
- if(object->variantType == YAFFS_OBJECT_TYPE_FILE)
- oh->fileSize = object->variant.fileVariant.fileSize;
tags.extraShadows = 0;
tags.extraShadows = 0;
+ /* Update file size */
+ if(object->variantType == YAFFS_OBJECT_TYPE_FILE){
+ oh->fileSize = object->variant.fileVariant.fileSize;
+ tags.extraFileLength = oh->fileSize;
+ }
+
yaffs_VerifyObjectHeader(object, oh, &tags, 1);
newChunk =
yaffs_WriteNewChunkWithTagsToNAND(dev,(__u8 *) oh, &tags, 1);
yaffs_VerifyObjectHeader(object, oh, &tags, 1);
newChunk =
yaffs_WriteNewChunkWithTagsToNAND(dev,(__u8 *) oh, &tags, 1);