[Yaffs] partiall writen block... why occur?

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: ???
Date:  
To: Charles Manning, yaffs
Old-Topics: Re: [Yaffs] FSX issues on YAFFS2
Subject: [Yaffs] partiall writen block... why occur?
hello... sir

why occur "Partially written block %d detected" ?


thank you...

I wish ..... as soon as .... let 's send e-mail to me.



1. yaffs filesystem version Info
const char *yaffs_guts_c_version =
    "$Id: yaffs_guts.c,v 1.95 2009/11/11 01:40:41 charles Exp $";



2. occur point...

static int yaffs_ScanBackwards(yaffs_Device *dev) in yaffs_guts.c



if (foundChunksInBlock) {
     /* This is a chunk that was skipped due to failing the erased check */
    } else if (c == 0) {
     /* We're looking at the first chunk in the block so the block is unused */
     state = YAFFS_BLOCK_STATE_EMPTY;
     dev->nErasedBlocks++;
    } else {
     if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING ||
         state == YAFFS_BLOCK_STATE_ALLOCATING) {
      if (dev->sequenceNumber == bi->sequenceNumber) {
       /* this is the block being allocated from */


       T(YAFFS_TRACE_SCAN,
         (TSTR
          (" Allocating from %d %d"
           TENDSTR), blk, c));


       state = YAFFS_BLOCK_STATE_ALLOCATING;
       dev->allocationBlock = blk;
       dev->allocationPage = c;
       dev->allocationBlockFinder = blk;
      } else {
       /* This is a partially written block that is not
        * the current allocation block. This block must have
        * had a write failure, so set up for retirement.
        */


        /* bi->needsRetiring = 1; ??? TODO */
        bi->gcPrioritise = 1;


        T(YAFFS_TRACE_ALWAYS,
        (TSTR("Partially written block %d detected" TENDSTR),                    <<--------- why occur ?
        blk));
      }
     }
    }


3. you will know the reason that "Partially written block xx detected".
    what do occur the reason? and what is slove method?