From nobody Tue Nov 26 13:35:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1574154870; cv=none; d=zoho.com; s=zohoarc; b=W/E9/XjfxPwzWJyKtLPDp5KYaWiJP6+XTHySRKMmDa+/khMYuxnkqiBBghKsdPafG0xL76ZRiOBYHaAR3uNfz9qwDgGyYOKdmgAmxHlaYhcXuIArqWcNZuOmr+cTmLg1Yd9GlM2lsb8izc8zzSnkXetfe69FITsQnq8MaFrDWlc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1574154870; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=u1TfTgi/1HBE9CquI+8FzbkVr7PNNBlA4hQWMvwZp6Q=; b=Pvp90pIkebUomRLgEyxvrnyt0jLuie9UNzNok8Cc2YMc8L/+WDDNlGviebJkzZfmY/GTXOaFzjbdQZcTZGARSd90WerwlMoJ3XuIqXQm67vUvAPRIFXtq+43m5Yacufow9Pc4CqasiCgpnhxG96qEDbidQEIiVsj1LCAprIeTT8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1574154870900786.5465717721596; Tue, 19 Nov 2019 01:14:30 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-419-ORUX84vsOqWQRu3Gbg3KUw-1; Tue, 19 Nov 2019 04:14:27 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B85C88024CD; Tue, 19 Nov 2019 09:14:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7A2495E243; Tue, 19 Nov 2019 09:14:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2E19E18089C8; Tue, 19 Nov 2019 09:14:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAJ9EIKM017784 for ; Tue, 19 Nov 2019 04:14:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id DB7731E9; Tue, 19 Nov 2019 09:14:18 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66B2E1B462 for ; Tue, 19 Nov 2019 09:14:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574154869; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=u1TfTgi/1HBE9CquI+8FzbkVr7PNNBlA4hQWMvwZp6Q=; b=d3gjwgclAS7ED5hDGxtd6c8Wrl63x0ynZ6Aqx3flU6q56/NY5toSqgoQUS8ky2yHuE9Fzk ly8tl1QyfE/t3ATQox8EU4vleuS5eWKiNeX8BZBpCDYj6MpLh16mG/QemIISa1f9f/QVtH wo/3u4/5B37wdi337cV8Nh9ybqYh3fk= From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 19 Nov 2019 10:14:09 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] qemuProcessStop: Simulate blockjob --abort on destroy X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: ORUX84vsOqWQRu3Gbg3KUw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" If user starts a blockcommit without --pivot then we modify access for qemu on both images and leave it like that until pivot is executed. So far so good. Problem is, if user instead of issuing pivot calls destroy on the domain. In this case we don't ever clear the access we granted at the beginning. https://bugzilla.redhat.com/show_bug.cgi?id=3D1741456#c19 Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 8cb12ac9a6..fa9167441e 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -7617,6 +7617,15 @@ void qemuProcessStop(virQEMUDriverPtr driver, for (i =3D 0; i < vm->def->niothreadids; i++) vm->def->iothreadids[i]->thread_id =3D 0; =20 + for (i =3D 0; i < def->ndisks; i++) { + virDomainDiskDefPtr disk =3D def->disks[i]; + + if (!disk->mirror) + continue; + + qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->mirror); + } + /* clear all private data entries which are no longer needed */ qemuDomainObjPrivateDataClear(priv); =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list