From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwviL-0003Gp-Gj for qemu-devel@nongnu.org; Mon, 13 Feb 2012 08:13:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwviF-0001TO-Qp for qemu-devel@nongnu.org; Mon, 13 Feb 2012 08:13:05 -0500 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:43498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwviF-0001SE-2t for qemu-devel@nongnu.org; Mon, 13 Feb 2012 08:12:59 -0500 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 13 Feb 2012 18:42:53 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q1DDCdXL4301038 for ; Mon, 13 Feb 2012 18:42:40 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q1DDCcDR005007 for ; Mon, 13 Feb 2012 18:42:39 +0530 Message-ID: <4F390C46.2010301@linux.vnet.ibm.com> Date: Mon, 13 Feb 2012 18:42:38 +0530 From: Supriya Kannery MIME-Version: 1.0 References: <20120201030557.2990.74150.sendpatchset@skannery.in.ibm.com> <20120201030712.2990.41527.sendpatchset@skannery.in.ibm.com> <4F29D5BD.2010209@linux.vnet.ibm.com> In-Reply-To: <4F29D5BD.2010209@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC Patch 5/7]Qemu: raw-posix image file reopen Reply-To: supriyak@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: Kevin Wolf , Stefan Hajnoczi , Luiz Capitulino , qemu-devel@nongnu.org, Christoph Hellwig On 02/02/2012 05:45 AM, Michael Roth wrote: > On 01/31/2012 09:07 PM, Supriya Kannery wrote: >> raw-posix driver changes for bdrv_reopen_xx functions to >> safely reopen image files. Reopening of image files while >> changing hostcache dynamically is handled here. >> >> + >> + /* Flags that can be set using fcntl */ >> + int fcntl_flags = BDRV_O_NOCACHE; >> + >> + if ((bs->open_flags& ~fcntl_flags) == (flags& ~fcntl_flags)) { >> + if ((flags& BDRV_O_NOCACHE)) { >> + s->open_flags |= O_DIRECT; >> + } else { >> + s->open_flags&= ~O_DIRECT; >> + } >> + printf("O_DIRECT flag\n"); >> + ret = fcntl_setfl(s->fd, s->open_flags); > > raw-posix.c:raw_aio_submit() does some extra alignment work if > s->aligned_buf was set due to the image being opened O_DIRECT initially, > not sure what the impact is but probably want to clean that up here. > ok, will check on this thanks! for reviewing Supriya