From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jqzp0-0001WB-Kx for qemu-devel@nongnu.org; Tue, 29 Apr 2008 20:05:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jqzox-0001VB-Vp for qemu-devel@nongnu.org; Tue, 29 Apr 2008 20:05:17 -0400 Received: from [199.232.76.173] (port=37416 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jqzox-0001V4-HM for qemu-devel@nongnu.org; Tue, 29 Apr 2008 20:05:15 -0400 Received: from mail2.shareable.org ([80.68.89.115]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jqzox-0005el-42 for qemu-devel@nongnu.org; Tue, 29 Apr 2008 20:05:15 -0400 Date: Wed, 30 Apr 2008 01:05:13 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH] Align file accesses with cache=off (O_DIRECT) Message-ID: <20080430000513.GC25408@shareable.org> References: <4807514B.9040607@suse.de> <4815EE89.70407@suse.de> <1209459667.4328.7.camel@frecb07144> <48173591.9010609@suse.de> <1209484105.4248.27.camel@frecb07144> <48174B0B.5070904@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48174B0B.5070904@suse.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Laurent Vivier Kevin Wolf wrote: > I think we agree that it's mostly item 3 why one would use O_DIRECT with > qemu. In terms of reliability, it is important that the data really is > written to the disk when the guest OS thinks so. But when for example > qemu crashes, I don't think it's too important if 40% or 50% of a > snapshot have already been written - it's unusable anyway. A sync > afterwards could be enough there. A call to fsync() after writing provides the same guarantee as O_DIRECT, or stronger if fsync() does a hard disk cache flush, which O_DIRECT does not. -- Jamie