qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/4] block: use fdatasync instead of fsync


From: Christoph Hellwig
Subject: Re: [Qemu-devel] [PATCH 2/4] block: use fdatasync instead of fsync
Date: Wed, 2 Sep 2009 02:37:05 +0200
User-agent: Mutt/1.3.28i

On Wed, Sep 02, 2009 at 01:34:54AM +0100, Jamie Lokier wrote:
> fdatasync is common among the big commercial unixes which were still
> being actively developed a few years ago, but fsync is universal -
> it's very old.
> 
> Neither OpenBSD nor FreeBSD have fdatasync.
> 
> mingw32 is a thin wrapper around Windows.  Windows as far as I can
> tell doesn't have an equivalent of fdatasync, although it does have an
> equivalent of O_DIRECT|O_SYNC (but documentation contradicts itself
> regarding whether the combination flushes metadata on each write).

Yeah,  I'll just add a

#ifndef _POSIX_SYNCHRONIZED_IO
# define fdatasync(fd)  fsync(fd)
#endif

Now I'm pretty sure we'll find various fuckups where headers define
fdatasync but not _POSIX_SYNCHRONIZED_IO or vice versa, but I can
outsource adding workarounds for that to people with those broken
setups.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]