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

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: apgmoorthy
Date:  
To: yaffs
CC: manningc2
Subject: Re: [Yaffs] [PATCH] [YAFFS2] Skip spare area read when using wide Tnodes
Hi All,

Kindly do know you comments and feedback on this patch.

With Regards

Gangheyamoorthy.A.P



-----Original Message-----
From: apgmoorthy [mailto:moorthy.apg@samsung.com]
Sent: Monday, September 22, 2008 8:53 PM
To: ''
Cc: ''
Subject: [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,