flushing buffer cache on mtd device: is the verify in flashcp actually reading back from the flash chip or the cache?

Clem Taylor clem.taylor at gmail.com
Mon Oct 16 16:02:49 EDT 2006


Hi,

Recently a question came up as to where we were really verifying that
the data was correctly being written to the flash. We are using
flashcp from a 2006.05.04 mtd snapshot to program the flash. Looking
at the code, after the write, it just does a lseek() back to the
beginning of the device and then starts reading. It is opening the
device with O_SYNC, but I thought that only effects writes, not reads.
Without doing something special, wouldn't this data just come from the
buffer cache instead of the physical device?

Is there something else doing on under the hood that would force a
read from physical device after a flash write?

                             Thanks,
                             Clem




More information about the linux-mtd mailing list