write buffer for MTD devices?
Hi,
You know that block devices such as hard disk has write buffer in hard disk itself to speed up the write performance. (The write buffer speed up when it works in write-back mode.)
My questions are: (only for NAND flash memory)
1) Then, does MTD devices has write buffer in device itself?
2) If ret->mtd->write() returns OK, is the data sent by user successfully written on flash memory media? (not cache or buffer)
Any comments, related matrials or URLs are needed.
--
Seongsu Lee, http://www.senux.com/
Quoted 9 lines · Seongsu Lee
Hi,
You know that block devices such as hard disk has write buffer in hard disk itself to speed up the write performance. (The write buffer speed up when it works in write-back mode.)
My questions are: (only for NAND flash memory)
1) Then, does MTD devices has write buffer in device itself?
The mtdblock driver does. It caches one eraseblock. JFFS2 also has a write buffer. Other than that, no.
Quoted 3 lines
2) If
ret->mtd->write()returns OK, is the data sent by user successfully written on flash memory media? (not cache or buffer)
Depends. If the write is being done to an mtdblock, then it is written to the cache. If it's being done to a "real" device, then it should be written to flash.
Quoted 1 line
Any comments, related matrials or URLs are needed.
It's all in the code.
josh