From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBkWP-0003WV-Am for qemu-devel@nongnu.org; Fri, 07 Feb 2014 07:27:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBkWO-0002ci-Bq for qemu-devel@nongnu.org; Fri, 07 Feb 2014 07:27:05 -0500 Received: from mail-qa0-x230.google.com ([2607:f8b0:400d:c00::230]:60597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBkWO-0002cd-73 for qemu-devel@nongnu.org; Fri, 07 Feb 2014 07:27:04 -0500 Received: by mail-qa0-f48.google.com with SMTP id f11so5002409qae.21 for ; Fri, 07 Feb 2014 04:27:03 -0800 (PST) Sender: Paolo Bonzini Message-ID: <52F4D111.1040200@redhat.com> Date: Fri, 07 Feb 2014 13:26:57 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <52F46298.8020602@ozlabs.ru> <52F48F3A.40606@redhat.com> <52F4AA56.9020901@beyond.pl> In-Reply-To: <52F4AA56.9020901@beyond.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] migration question: disk images on nfs server List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?TWFyY2luIEdpYnXFgmE=?= , qemu-devel@nongnu.org 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