From nobody Tue May 7 23:17:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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 (zohomail.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=1575543329; cv=none; d=zohomail.com; s=zohoarc; b=hdY7w+iMcDUtn06WMKloMSEz7a7L4zRqZll2e+SDFB7M3QGQfCECevepvp7cUugP7ivri1XIcmrbDxbt7F981ZwQxZqb5DMd7N3kJ6+AN/Qyr5Kx0yti5Sdgf6tuXXokFulpG5WetFlp/Z/vhszApWUxz+PV9/2vAlhY/KdZvfo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575543329; 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=X0cvwiUnnSXBVFxuvIH6bB1sd19MkIODQK1BMzLTj+o=; b=Jlg/MKAIlhMZX5MyTi4D1Tt3t70eK6azl83mNpGhS7JFxEiPQyDsNWcMWE5OaVfKfogJ64WnnEY8IMZLq1TaEWD7w0dMq+Vd0fR2AC4oB4fbGA0br4N9DpxuBTAXEiVLQP5LM4ZQBvy4L+xo0k8pzwfUxC5tCaXVmZS3TclLC0E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.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-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1575543329873695.3223302328057; Thu, 5 Dec 2019 02:55:29 -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-105-2r_z_1T-MtanaXeqQjvHxA-1; Thu, 05 Dec 2019 05:55:27 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B3C33800D5E; Thu, 5 Dec 2019 10:55:21 +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 582AF10013A1; Thu, 5 Dec 2019 10:55:21 +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 17D8818034EA; Thu, 5 Dec 2019 10:55:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB5AtILx006860 for ; Thu, 5 Dec 2019 05:55:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8924677356; Thu, 5 Dec 2019 10:55:18 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AE2E756A7 for ; Thu, 5 Dec 2019 10:55:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575543328; 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=X0cvwiUnnSXBVFxuvIH6bB1sd19MkIODQK1BMzLTj+o=; b=HgjlaF2cjvjGuE0xis4HUAt/REbej4fWdhzwBKTSwGX39M3jzJGvFJWRfF0JfcpY895NFL 7KNAEuJ6YhIRclgQTR/nh4PfE33qHgm7lunuQGEX1UgzjDSBpmSTCT50d8cRFf0imU9Zh2 FKMLZK3TeTptVsSO/Ei2/NMJzSlAUjY= From: Michal Privoznik To: libvir-list@redhat.com Date: Thu, 5 Dec 2019 11:51:13 +0100 Message-Id: <286fd1576672bcd66e463cc963d028ccf8316535.1575537481.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2] 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.84 on 10.5.11.22 X-MC-Unique: 2r_z_1T-MtanaXeqQjvHxA-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" 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. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- 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..5e178b3c6c 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