[Yaffs] [PATCH] [YAFFS2] Skip spare area read when using wid…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: apgmoorthy
Date:  
To: yaffs
CC: manningc2
Subject: [Yaffs] [PATCH] [YAFFS2] Skip spare area read when using wide Tnodes
During read operation, there is an additional spare read while
determining flash page address for a file offest in
yaffs_FindChunkInGroup. This spare read is useful only when
"Disable Wide Tnodes" option is enabled.

In this patch, we check if groupSize is 1 ie if individual flash
page addresses are stored in level 0 Tnodes. If so, then we skip
the spare read check for that chunk and return that the requested
chunk is found to be correct.

Signed-off-by: Rohit Hagargundgi <>
--- a/fs/yaffs2/yaffs_guts.c    2008-09-02 17:50:02.000000000 +0530
+++ b/fs/yaffs2/yaffs_guts.c    2008-09-02 17:48:57.000000000 +0530
@@ -1551,6 +1551,9 @@ static int yaffs_FindChunkInGroup(yaffs_
 {
     int j;


+    if (dev->chunkGroupSize == 1)
+        return theChunk ? theChunk : -1;
+
     for (j = 0; theChunk && j < dev->chunkGroupSize; j++) {
         if (yaffs_CheckChunkBit
             (dev, theChunk / dev->nChunksPerBlock,