From nobody Tue Nov 26 09:28:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1575477716; cv=none; d=zohomail.com; s=zohoarc; b=ARM6H05CwQ4uxGaSZvl72uwSR/Rz9y7Frj40NLFRXG4tYs5Agg+Rc1gFQT+xcaxhAJHhV7mEkKRatx+JjsbyoXufj5F4KS74JaJQTdQwzeUGFYXu9M9mbIAPUJnEScjjyC2YU8tQWOhXoGUUIOwi9hOwM1wxxIOJY1GgXggFaCw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575477716; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=r4JHDWSj9RlqOsc/8NTsC5Qyj/kcsqo3TNs8yV1PJEk=; b=VhLfijHsBqoL4Z5P2CyslU3N3duWmD1Y0qFUOeUxwE5RRcAXijfLfneFdfvMkQ3l4LUT1+OTCtolRGkXUwnDDBm7mZJxsKQt2Lw6o7N24b4/SgREGb+5xLcdH8Jn4N/M1b/Jwu+VzipeQNagDbCp58jSE37gy5/KT2G4Gk58J5E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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 [205.139.110.61]) by mx.zohomail.com with SMTPS id 157547771609692.75528501825033; Wed, 4 Dec 2019 08:41:56 -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-26-nbNL6b4oOhmTSYZQ--jRrA-1; Wed, 04 Dec 2019 11:41:53 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 35E60DB61; Wed, 4 Dec 2019 16:41:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E88AD6CE46; Wed, 4 Dec 2019 16:41:45 +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 EABF25BC16; Wed, 4 Dec 2019 16:41:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB4Gex5m016292 for ; Wed, 4 Dec 2019 11:40:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7C7C8600D5; Wed, 4 Dec 2019 16:40:59 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 04FB4600D1 for ; Wed, 4 Dec 2019 16:40:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575477714; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=r4JHDWSj9RlqOsc/8NTsC5Qyj/kcsqo3TNs8yV1PJEk=; b=UbA8C81+z5kcxccrXaKWUA7+v+GCiKFoQLUmE8Fb1osFPRfDNLIiIg/klneCUe+N1WB06I ZoAMuEnB/mfFMIZI9MktIJqGD8qRF4Jm85drKVMHUOwuYuOAd52b6PYL6fSsje/1tyV7nd MaXoTAJthU3RgKKXPCd49N+bd8IQFvc= From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 4 Dec 2019 17:40:53 +0100 Message-Id: <7e27df7351077ebf23c309ba0d161707a779cde7.1575477647.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemuProcessStop: Remove image metadata only when allowed 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.12 X-MC-Unique: nbNL6b4oOhmTSYZQ--jRrA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) In v5.9.0-370-g8fa0374c5b I've tried to fix a bug by removing some stale XATTRs in qemuProcessStop(). However, I forgot to do nothing when the VIR_QEMU_PROCESS_STOP_NO_RELABEL flag was specified. =F0=9F=A4=A6 Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 75ee3893c6..df19977bb3 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -7648,13 +7648,15 @@ void qemuProcessStop(virQEMUDriverPtr driver, /* Do this explicitly after vm->pid is reset so that security drivers = don't * try to enter the domain's namespace which is non-existent by now as= qemu * is no longer running. */ - for (i =3D 0; i < def->ndisks; i++) { - virDomainDiskDefPtr disk =3D def->disks[i]; + if ((flags & VIR_QEMU_PROCESS_STOP_NO_RELABEL)) { + for (i =3D 0; i < def->ndisks; i++) { + virDomainDiskDefPtr disk =3D def->disks[i]; =20 - if (disk->mirror) - qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->mirr= or); + if (disk->mirror) + qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->= mirror); =20 - qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->src); + qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->src); + } } =20 /* clear all private data entries which are no longer needed */ --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list