On Tuesday 08 February 2011 14:25:17 ext mikhail.zabaluev(a)nokia.com, you
wrote:
Hi,
> -----Original Message-----
> From: ofono-bounces(a)ofono.org [mailto:ofono-bounces@ofono.org] On
> Behalf Of ext Rémi Denis-Courmont
> Sent: Tuesday, February 08, 2011 2:04 PM
> To: ofono(a)ofono.org
> Subject: Re: [RFC 0/1] use fsync in storage
>
> On Tuesday 08 February 2011 13:47:51 ext Kai Vehmanen, you wrote:
> > 3) Is it ok, build-wise, for ofono to require availability
>
> fdatasync()
>
> > (which I think would be sufficient in this case and slightly
> > less expensive).
>
> I would use fdatasync().
What about ensuring that file metadata are synced as well (e.g. the file
itself cannot be lost on the filesystem)?
fdatasync() syncs the data and the metadata NEEDED TO READ the data afterward,
which includes the file directory entry and file size (in practice, I guess most
filesystems implement both the same).
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki