Subject: Re: sync() does not write to actual Hardware

From: Nicolas Pitre <[email-masked]>
Date: Fri, 11 Aug 2000 14:54:37 -0400 (EDT)

On Wed, 2 Aug 2000, Huh, Woojung wrote:

> Hi, All,
> 
> I'm testing on 2.4.0-test4-np1 on ADS Graphics Client.
> When I execute "sync" command, it does not write to flash memory.
> Flash is updated when "umount" is executed.
> I also tested on 2.3.35, the result is same.
> Did anybody experience it ?

In order to cope with large flash page which are much larger than what the
block device layer can handle, there is another cache locally to the flash
driver.  Unfortunately I didn't find a way to hook into the kernel so the
driver could be noticed when a sync() occured.

For instance the cache is always cleaned on close() (or unmount).  So you
can ensure the flash has been written with the following:

	sync ; true < /dev/flash

Nicolas

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++