From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj5fJ-0004t6-TJ for qemu-devel@nongnu.org; Fri, 17 Apr 2015 08:46:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yj5fJ-0005xM-3H for qemu-devel@nongnu.org; Fri, 17 Apr 2015 08:46:37 -0400 Message-ID: <553100A1.2070007@redhat.com> Date: Fri, 17 Apr 2015 14:46:25 +0200 From: Max Reitz MIME-Version: 1.0 References: <552E8D2E.8060103@redhat.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 4/6] block: Support streaming to an intermediate layer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Stefan Hajnoczi , qemu-block@nongnu.org On 16.04.2015 16:30, Alberto Garcia wrote: > On Wed 15 Apr 2015 06:09:18 PM CEST, Max Reitz wrote: > >>> + orig_bs_flags = bdrv_get_flags(bs); >>> + if (!(orig_bs_flags & BDRV_O_RDWR)) { >> I feel like we don't want to do this if we're not streaming to an >> intermediate layer but to the top layer (because that means there is >> some reason for the BDS to be read-only beyond it just being a backing >> BDS). > Looks like we don't actually need to do anything, bdrv_reopen_prepare() > already takes care of checking the BDRV_O_ALLOW_RDWR flag, which is not > set if the image was opened in read-only mode. Oh, that's nice. :-) Max