qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] migration question: disk images on nfs server


From: Paolo Bonzini
Subject: Re: [Qemu-devel] migration question: disk images on nfs server
Date: Fri, 07 Feb 2014 13:26:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Il 07/02/2014 10:41, Marcin Gibuła ha scritto:
>> For NFS you need to use the sync mount option to force the NFS client to
>> sync to
>> server on writes.
> 
> Isn't opening with O_DIRECT enough? (for linux nfs client at least)

Yeah, the man page says:

       If neither sync nor async is specified (or
       if the async option is specified), the NFS client delays sending appli‐
       cation writes to the server until any of these events occur:

              Memory pressure forces reclamation of system memory resources.

              An  application  flushes  file  data  explicitly  with  sync(2),
              msync(2), or fsync(3).

              An application closes a file with close(2).

              The file is locked/unlocked via fcntl(2).

       In other words, under normal circumstances, data written by an applica‐
       tion may not immediately appear on the server that hosts the file.

QEMU does flush file data with fsync(3).  It's not the first time I hear about
needing the sync option though.

Paolo



reply via email to

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