From patchwork Tue Mar 26 17:07:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alberto Garcia X-Patchwork-Id: 1065808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=igalia.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="Qr9uk5Xb"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44THk30nC9z9sSV for ; Wed, 27 Mar 2019 04:12:11 +1100 (AEDT) Received: from localhost ([127.0.0.1]:35378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8pcO-0008R4-Si for incoming@patchwork.ozlabs.org; Tue, 26 Mar 2019 13:12:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8pYP-0005FF-PN for qemu-devel@nongnu.org; Tue, 26 Mar 2019 13:08:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8pYN-0000Nn-Fd for qemu-devel@nongnu.org; Tue, 26 Mar 2019 13:08:01 -0400 Received: from fanzine.igalia.com ([91.117.99.155]:59738) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h8pYL-0000FY-5T; Tue, 26 Mar 2019 13:07:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Message-Id:Date:Subject:Cc:To:From; bh=UyLjllGonPbcB45B57UsvYM196mn4I0JnkS0Lhv5olo=; b=Qr9uk5XbCuLfflX1QysQ0Cbrr2xPilRfhItVk4bZW5GBSFcgge3KMnVaEhgWmgNNhh7OK2WP8mv+FQRaLFoUwzIqR0+qmEzE8KN6nd8GfNCkVGnKsJciPs/Zg7GSwWJGHa5+n5j168JJlb0FfRudRp/2UPvOZPa/VutBDw905k28KVxbpUqdA4iLnJKRwJjLkhpDQHUFKFb/siaDBe44TksMGLpPlE+y37YFIWRh1i73vrVXkIrXtR3fRQaxbrDLcSJJzn08x3N5lS6KZy10Wvrkqq3iRjxCRyLFV4ihfbnopA+Ue3MrdsTxuu9fhnO7TlOqSoz+7mGC+jeBmHvrVQ==; Received: from 62-165-147-230.co.dnainternet.fi ([62.165.147.230] helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1h8pXl-0007zT-85; Tue, 26 Mar 2019 18:07:21 +0100 Received: from berto by perseus.local with local (Exim 4.89) (envelope-from ) id 1h8pXY-00010C-07; Tue, 26 Mar 2019 19:07:08 +0200 From: Alberto Garcia To: qemu-devel@nongnu.org Date: Tue, 26 Mar 2019 19:07:00 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.117.99.155 Subject: [Qemu-devel] [PATCH for-4.0 0/3] freeze the backing chain earlier in stream_start() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Vladimir Sementsov-Ogievskiy , Alberto Garcia , qemu-block@nongnu.org, Max Reitz , Andrey Shinkevich Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Hi, this series fixes the bug that I found the other day and described here: https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00764.html https://lists.gnu.org/archive/html/qemu-block/2019-03/msg00791.html Patch 2 is the important one, patch 3 is a test case, and patch 1 will allow us to detect this kind of errors earlier. Regards, Berto Alberto Garcia (3): block: continue until base is found in bdrv_freeze_backing_chain() et al block: freeze the backing chain earlier in stream_start() block: test block-stream with a base node that is used by block-commit block.c | 21 ++++++++++++++------- block/stream.c | 13 +++++++------ tests/qemu-iotests/030 | 32 ++++++++++++++++++++++++++++++++ tests/qemu-iotests/030.out | 4 ++-- 4 files changed, 55 insertions(+), 15 deletions(-)