On 28 May 2013, at 2:37am, Woody Wu <narkewo...@gmail.com> wrote:

> How do you guys think about this: if NAND has an
> IO problem, Yaffs2 should recover it or forward the error to
> applications, right?

Arguably.  The file system can send an error back to the application.  If 
something does that to SQLite3 SQLite3 will then return the result 
SQLITE_IOERR.  If your program is correctly looking at the results returned 
from every SQLite3 API call, and it's not seeing that error, it would seem that 
yaffs2 is not doing the correct thing in this case.  And from what you wrote it 
seems that rather than return an error to the program, yaffs2 prefers to write 
an error message to the console.  Which is not what these things are meant to 
do.


On 28 May 2013, at 2:40am, Woody Wu <narkewo...@gmail.com> wrote:

> Can you experts explains why a cheap Flash drive can harm an
> application such as sqlite?

> Does you mean these cheap drive was cheating
> with ECC?

It might just be so bad that it doesn't even realise something is wrong.  You 
write something to sector 2336 and later read sector 2336 and expect to get the 
same thing back, but instead it returns the contents of sector 2338.  Faulty 
hardware, perhaps.

> Otherwise, filesystem should be able to capture IO error (fix
> it or forward), right?

If by 'forward' you mean to tell the application something went wrong, then 
right.  But the file system might not know anything is wrong.  It asked for 
sector 2336 and it got some data.  How is it meant to know the data it 
retrieved came from the wrong place on the chip ?

On 28 May 2013, at 2:33am, Woody Wu <narkewo...@gmail.com> wrote:

> How can I tell what's the current VFS that I was using? Thanks.

Actually, just ignore that.  You couldn't do anything about it even if you 
knew.  From what Doctor Hipp wrote, I suspect that yaffs2 is faulty.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to