qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_D


From: Jamie Lokier
Subject: Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT)
Date: Wed, 21 May 2008 14:41:54 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Avi Kivity wrote:
> Jamie Lokier wrote:
> >Why would O_SYNC be better than O_DIRECT?
> 
> O_SYNC is a write-through cache.  O_DIRECT is completely uncached.  Both 
> have their uses (including in this context), so you can't say one is 
> better than the other.

Fine, but the question is: why would O_SYNC be better for
*data integrity* than O_DIRECT?  Referring to:

Anthony Liguori wrote:
> For people that care about data integrity, we should be using O_SYNC,
> not O_DIRECT anyway.

Could it be connected with this, from elsewhere?

Rob van Nieuwkerk wrote:
> It appears that somewhere between RH kernels 2.4.18-27.7.x and 2.4.20-18.9
> something has changed so that my application needs a O_SYNC too besides
> the O_DIRECT to make sure that writes will be synchronous.  If I leave
> the O_SYNC out with 2.4.20-18.9 the write will happen physically 35
> seconds after the write()

For that, O_SYNC is used in conjunction with O_DIRECT, rather than
instead of it.

-- Jamie





reply via email to

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