Re: [Yaffs] Time stamp not updated upon sync

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Laurence Withers
Date:  
To: yaffs
Subject: Re: [Yaffs] Time stamp not updated upon sync
On Tue, Sep 15, 2009 at 09:34:33AM +1200, Charles Manning wrote:
> * datasync() acts like fsync() although POSIX spec says that datasync() does
> not update metadata. I'm not sure if this optional. This is perhaps a bug.


I'm also not sure whether it's optional, but as fsync(2) points out, ``The
aim of fdatasync() is to reduce disk activity for applications that do not
require all metadata to be synchronized with the disk.''.

I have a fair number of applications which use memory-mapped files and which
frequently call msync() to ensure the data hits the flash. It would be nice
to reduce the amount of writes that actually hit the flash, and one way of
doing this is skipping mtime updates.

If anybody *does* desire an mtime update, they can simply use the fsync()
call.

Bye for now,
-- 
Laurence Withers, <>               http://www.lwithers.me.uk/