From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtee0-0002r9-Ln for qemu-devel@nongnu.org; Thu, 19 Dec 2013 09:32:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vtedu-00046K-NA for qemu-devel@nongnu.org; Thu, 19 Dec 2013 09:32:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtedu-000467-EC for qemu-devel@nongnu.org; Thu, 19 Dec 2013 09:32:02 -0500 Message-ID: <52B30359.6040901@redhat.com> Date: Thu, 19 Dec 2013 15:31:53 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1387271725-17060-1-git-send-email-pl@kamp.de> <20131217173202.GJ14832@redhat.com> <363AFFBF-8F24-4AC3-840F-481A523402B4@kamp.de> <52B17223.2070708@redhat.com> <20131218101818.GE16168@redhat.com> <52B177E1.6060802@redhat.com> <52B17B2B.1020103@redhat.com> <0610458E-282F-4ABC-96CA-498E4661485E@kamp.de> In-Reply-To: <0610458E-282F-4ABC-96CA-498E4661485E@kamp.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv2] block: add native support for NFS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: "kwolf@redhat.com" , "famz@redhat.com" , "qemu-devel@nongnu.org" , Orit Wasserman , "stefanha@redhat.com" Il 18/12/2013 18:21, Peter Lieven ha scritto: > Not completely I think, but please correct me if I am wrong. > > If cache=writeback is set we issue just a write. In libnfs or libiscsi case > that guarantees that the request has been successfully executed > on the target / server. This is enough to be consistent in case of > migration because consecutive reads will be answered correctly. > > But the target / server is still free to just keep this > data in memory so we should only set this if we know that the target / server > e.g. has a battery backup or we know that the filesystem uses e.g. barriers and > issues a flush at important points. Yes. However, the same holds for cache=none (both on libnfs/libiscsi/NBD/others, where it is a nop, and on regular I/O, where it uses O_DIRECT *but not O_SYNC or O_DSYNC*). > If cache=none is set we issue a flush after every single write. That's what you get with cache=writethrough or cache=directsync. Here the flush is added automatically by the block layer, so it works with every driver. Paolo