mtdblock caching and syncing

Jamie Lokier jamie at shareable.org
Thu Apr 9 14:07:24 EDT 2009


Doug Graham wrote:
> > The device in question isn't the flash.  It's the mtdblock device.  So
> > fsync semantics are preserved.  This is the same as writing to a file
> > on a hard drive, calling fsync, and having it sit in the hard drive's
> > cache.
> 
> That's a good point, and one I've wondered about before.  I don't know
> much about how hard drives manage their cache, but I would assume that
> they don't leave dirty data in their cache for an unbounded period
> of time.  I'd guess that data is written to the actual disk within a
> few 10s of milliseconds after being sent to the device.

Ideally, fsync() should flush data from a hard drive's cache too.

-- Jamie



More information about the linux-mtd mailing list