From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1DJg-00004v-Ij for qemu-devel@nongnu.org; Tue, 14 Aug 2012 05:21:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1DJe-0000Hk-C1 for qemu-devel@nongnu.org; Tue, 14 Aug 2012 05:21:36 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:58207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1DJd-0000HI-JE for qemu-devel@nongnu.org; Tue, 14 Aug 2012 05:21:34 -0400 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 14 Aug 2012 14:51:28 +0530 Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7E9LQxV26149006 for ; Tue, 14 Aug 2012 14:51:26 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7E9LPPm011731 for ; Tue, 14 Aug 2012 19:21:25 +1000 Message-ID: <502A1893.8030403@linux.vnet.ibm.com> Date: Tue, 14 Aug 2012 14:51:23 +0530 From: Supriya Kannery MIME-Version: 1.0 References: <20120730213409.21536.7589.sendpatchset@skannery.in.ibm.com> <20120730213422.21536.81486.sendpatchset@skannery.in.ibm.com> <5022D68E.40308@redhat.com> In-Reply-To: <5022D68E.40308@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [v2 Patch 1/9]block: Framework for reopening image files safely Reply-To: supriyak@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: jcody@redhat.com Cc: Kevin Wolf , Shrinidhi Joshi , Stefan Hajnoczi , qemu-devel@nongnu.org, Luiz Capitulino , Christoph Hellwig On 08/09/2012 02:43 AM, Jeff Cody wrote: > On 07/30/2012 05:34 PM, Supriya Kannery wrote: >> Struct BDRVReopenState along with three reopen related functions >> introduced for handling reopening of images safely. This can be >> extended by each of the block drivers to reopen respective >> image files. >> >> + >> + bdrv_reopen_commit(bs, reopen_state); >> + bs->open_flags = bdrv_flags; > > You also need to set bs->read_only here, like so: > bs->read_only = !(bdrv_flags& BDRV_O_RDWR); > > Sure..will include in updated patch. - thanks, Supriya