From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhmUm-0003XY-NZ for qemu-devel@nongnu.org; Tue, 06 May 2014 17:01:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhmUg-0005b2-Jm for qemu-devel@nongnu.org; Tue, 06 May 2014 17:01:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhmUg-0005ay-CY for qemu-devel@nongnu.org; Tue, 06 May 2014 17:01:42 -0400 Message-ID: <53694DB1.1010603@redhat.com> Date: Tue, 06 May 2014 23:01:37 +0200 From: Max Reitz MIME-Version: 1.0 References: <1399371550-5212-1-git-send-email-kwolf@redhat.com> In-Reply-To: <1399371550-5212-1-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block: Fix open flags with BDRV_O_SNAPSHOT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-devel@nongnu.org Cc: jan.kiszka@web.de, stefanha@redhat.com On 06.05.2014 12:19, Kevin Wolf wrote: > The immediately visible effect of this patch is that it fixes committing > a temporary snapshot to its backing file. Previously, it would fail with > a "permission denied" error because bdrv_inherited_flags() forced the > backing file to be read-only, ignoring the r/w reopen of bdrv_commit(). > > The bigger problem this releaved is that the original open flags must > actually only be applied to the temporary snapshot, and the original > image file must be treated as a backing file of the temporary snapshot > and get the right flags for that. > > Reported-by: Jan Kiszka > Signed-off-by: Kevin Wolf > --- > block.c | 34 +++++++++++++++++++--------------- > include/block/block.h | 2 +- > tests/qemu-iotests/051 | 4 ++++ > tests/qemu-iotests/051.out | 10 ++++++++++ > 4 files changed, 34 insertions(+), 16 deletions(-) Reviewed-by: Max Reitz