Re: [Yaffs] TODO list for Linux stuff

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Timofei V. Bondarenko
Date:  
To: Charles Manning
CC: yaffs
Subject: Re: [Yaffs] TODO list for Linux stuff
Hi.

Charles Manning wrote:
> I have a mini-todo list that I am working through for the Linux stuff.
> Suggestions for additions/proioritsation welcome:


> 3) Clean up for kernel integration, and get into kernel.


The option names CONFIG_YAFFS_* and CONFIG_YAFFS2_* are messed up a bit.

> 5) Some other speed-ups


One more thing to look at is yaffs' vs. MTD's write verification.

IMHO, there is no reason to use both and the MTD does it better.

The YAFFS_DISABLE_WRITE_VERIFY could be default for linux.
Unfortunately, it does remove the yaffs_VerifyCompare() only,
while the yaffs_ReadChunkFromNAND() is still waste time.

I've attached a simple patch, but I'm in doubts about call to
yaffs_ReadChunkFromNAND() in the yaffs_DeleteChunk()
(yaffs_guts.c line 3238): it breaks compilation with MTD_NAND_VERIFY_WRITE...

--
Regards.
    Timofei.

    

Index: yaffs_fs.c
===================================================================
RCS file: /home/aleph1/cvs/yaffs2/yaffs_fs.c,v
retrieving revision 1.5
diff -u -p -r1.5 yaffs_fs.c
--- yaffs2/yaffs_fs.c    29 Apr 2005 07:01:18 -0000    1.5
+++ yaffs2/yaffs_fs.c    14 Jul 2005 12:52:45 -0000
@@ -1341,7 +1341,8 @@ static struct super_block *yaffs_interna
     T(YAFFS_TRACE_OS,("yaffs_read_super: Using yaffs%d\n",yaffsVersion));
     T(YAFFS_TRACE_OS,("yaffs_read_super: %s block size %d\n", useRam ? "RAM" : "MTD",(int)(sb->s_blocksize)));


-#ifdef CONFIG_YAFFS_DISABLE_WRITE_VERIFY
+#if defined( CONFIG_YAFFS_DISABLE_WRITE_VERIFY ) && \
+   !defined( CONFIG_MTD_NAND_VERIFY_WRITE )
     T(YAFFS_TRACE_OS,("yaffs: Write verification disabled. All guarantees null and void\n"));
 #endif


Index: yaffs_tagscompat.c
===================================================================
RCS file: /home/aleph1/cvs/yaffs2/yaffs_tagscompat.c,v
retrieving revision 1.2
diff -u -p -r1.2 yaffs_tagscompat.c
--- yaffs2/yaffs_tagscompat.c    16 Mar 2005 04:00:36 -0000    1.2
+++ yaffs2/yaffs_tagscompat.c    14 Jul 2005 12:52:45 -0000
@@ -377,6 +377,7 @@ static int yaffs_WriteNewChunkToNAND(str
                 writeOk =  yaffs_WriteChunkToNAND(dev,chunk,data,spare);
             }
             attempts++;
+#ifndef CONFIG_YAFFS_DISABLE_WRITE_VERIFY
             if(writeOk)
             {
                 // Readback & verify
@@ -386,7 +387,6 @@ static int yaffs_WriteNewChunkToNAND(str
                 // NB We check a raw read without ECC correction applied
                 yaffs_ReadChunkFromNAND(dev,chunk,rbData,&rbSpare,0);


-#ifndef CONFIG_YAFFS_DISABLE_WRITE_VERIFY
                 if(!yaffs_VerifyCompare(data,rbData,spare,&rbSpare))
                 {
                     // Didn't verify
@@ -394,9 +394,9 @@ static int yaffs_WriteNewChunkToNAND(str


                     writeOk = 0;
                 }
-#endif


             }
+#endif
             if(writeOk)
             {
                 // Copy the data into the write buffer.