From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpMW8-0000X8-QQ for qemu-devel@nongnu.org; Fri, 05 Aug 2011 11:40:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QpMW7-0002XI-OX for qemu-devel@nongnu.org; Fri, 05 Aug 2011 11:40:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpMW6-0002WI-PE for qemu-devel@nongnu.org; Fri, 05 Aug 2011 11:40:55 -0400 Message-ID: <4E3C0FAA.2080303@redhat.com> Date: Fri, 05 Aug 2011 17:43:38 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <4E3BB203.5060703@redhat.com> <20110805131247.GC6201@redhat.com> <20110805142812.GB17323@lst.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Safely reopening image files by stashing fds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Supriya Kannery , Anthony Liguori , qemu-devel , Paolo Bonzini , Christoph Hellwig Am 05.08.2011 17:24, schrieb Stefan Hajnoczi: > On Fri, Aug 5, 2011 at 3:28 PM, Christoph Hellwig wrote: >> On Fri, Aug 05, 2011 at 02:12:48PM +0100, Daniel P. Berrange wrote: >>>> Because you cannot change O_DIRECT on an open fd :(. This is why >>>> we're going through this pain. >>> >>> Hmm, I remember hearing that before, but looking at the current fcntl() >>> manpage, it claims you *can* change O_DIRECT using SET_FL. Perhaps this >>> is a newish feature, but it'd be nicer to use it if possible ? >> >> It's been there since day 1 of O_DIRECT support. > > Sorry, my bad. So for Linux we could just use fcntl for > block_set_hostcache and not bother with reopening. However, we will > need to reopen should we wish to support changing O_DSYNC. We do wish to support that. Anthony thinks that allowing the guest to toggle WCE is a prerequisite for making cache=writeback the default. And this is something that I definitely want to do for 1.0. Kevin