From nobody Tue Nov 26 04:23:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1585734006; cv=none; d=zohomail.com; s=zohoarc; b=E8VW8R2FbNIx0b5/9unm0+3HLrZcJPUpUwDT1oXOK/EZFuy7QvdYc1p2DP9qM1xwHUmd9WEAK0vUB2UadnN2Q0QkZxVM9P7imIahk9Pop8JzM2iGz5KV6GeMAyaP/8UCGgrHi+7kNh7iTPgTcIrJxGXhyMrGjUkuZdf1wQH5qg4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585734006; 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=zbtBgxz7NA33GjY7NyXy1C9qrVW6H4C3yr/x+qFV1XE=; b=bJxrIkqs0r7n97BTJrSP94Y7FHzOqNVEkISZjKGWOGgrsUvmb2zQk//pO6viOb5B+jK8uCmTOrmlCJ6zzUfpf2KiFXrJ/iTFAHwgE/tAQWkkKz1u7wsQ5fPPvaIZad12lxKHLhf8elQ6AKbxJenSTSzGyl4pIp318eZmCqbRnWw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1585734006114164.95612002606447; Wed, 1 Apr 2020 02:40:06 -0700 (PDT) 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-433-lwoqAA8QOdaRYIb8jWBCdw-1; Wed, 01 Apr 2020 05:40:02 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 64F528018A3; Wed, 1 Apr 2020 09:39:56 +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 3A876DA0F7; Wed, 1 Apr 2020 09:39:56 +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 E7E6986C1B; Wed, 1 Apr 2020 09:39:55 +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 0319ZRem019745 for ; Wed, 1 Apr 2020 05:35:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 04C51DA106; Wed, 1 Apr 2020 09:35:27 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.49]) by smtp.corp.redhat.com (Postfix) with ESMTP id 68354DA109 for ; Wed, 1 Apr 2020 09:35:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585734004; 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=zbtBgxz7NA33GjY7NyXy1C9qrVW6H4C3yr/x+qFV1XE=; b=dyF8HgaNuEG5XWKs6+wuRMZwY68q7UwNrO7yb7jrUl1DUSO0EkvZ+3zPRcTJr1chu/jceL ZZoBF1YAcUCGvxkzyV20qAc6+D5V9+5hoXNlGqiUAcZ30u8LesiItOUFdVxgnwFNiTy3v0 /8KwTU49dxv9lQXPpQdrIdQzVu0Spq0= X-MC-Unique: lwoqAA8QOdaRYIb8jWBCdw-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/3] qemu: use QEMU_CAPS_STORAGE_WERROR for disk-error attributes Date: Wed, 1 Apr 2020 11:35:19 +0200 Message-Id: <615595fdbebdb6c71b9f11bc975acae69772bfe4.1585733685.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" When moving the formatting of this attributes from -drive to -device, the QEMU_CAPS_USB_STORAGE_WERROR capability was used, because usb-storage was the last device to gain this capability. However this lead to the assumption that QEMU binaries without the usb-storage device do not support this, leading to breakage on s390x with blockdev. Fixes: bb4f3543bbf3ebbffa833ae7df55c298920243eb https://bugzilla.redhat.com/show_bug.cgi?id=3D1819250 Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 4 ++-- .../disk-error-policy-s390x.s390x-2.12.0.args | 12 ++++++------ .../disk-error-policy-s390x.s390x-latest.args | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d1b689dfd3..2f0e919cc1 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1790,7 +1790,7 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, =20 /* werror/rerror are really frontend attributes, but older * qemu requires them on -drive instead of -device */ - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_WERROR)) + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_STORAGE_WERROR)) qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt); =20 if (disk->src->readonly) @@ -2241,7 +2241,7 @@ qemuBuildDiskDeviceStr(const virDomainDef *def, =20 qemuBuildDiskFrontendAttributes(disk, &opt); =20 - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_WERROR)) + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_STORAGE_WERROR)) qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt); =20 return virBufferContentAndReset(&opt); diff --git a/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-2.12.0.ar= gs b/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-2.12.0.args index cf932d1fad..6b93b74ec1 100644 --- a/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-2.12.0.args +++ b/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-2.12.0.args @@ -26,17 +26,17 @@ file=3D/tmp/lib/domain--1-guest/master-key.aes \ -no-shutdown \ -boot strict=3Don \ -drive file=3D/var/images/image1,format=3Dqcow2,if=3Dnone,id=3Ddrive-virti= o-disk0,\ -werror=3Dstop,rerror=3Dstop,cache=3Dnone \ +cache=3Dnone \ -device virtio-blk-ccw,scsi=3Doff,devno=3Dfe.0.0000,drive=3Ddrive-virtio-d= isk0,\ -id=3Dvirtio-disk0,bootindex=3D1,write-cache=3Don \ +id=3Dvirtio-disk0,bootindex=3D1,write-cache=3Don,werror=3Dstop,rerror=3Dst= op \ -drive file=3D/var/images/image2,format=3Dqcow2,if=3Dnone,id=3Ddrive-virti= o-disk1,\ -werror=3Denospc,cache=3Dnone \ +cache=3Dnone \ -device virtio-blk-ccw,scsi=3Doff,devno=3Dfe.0.0001,drive=3Ddrive-virtio-d= isk1,\ -id=3Dvirtio-disk1,write-cache=3Don \ +id=3Dvirtio-disk1,write-cache=3Don,werror=3Denospc \ -drive file=3D/var/images/image3,format=3Dqcow2,if=3Dnone,id=3Ddrive-virti= o-disk2,\ -werror=3Dreport,rerror=3Dignore,cache=3Dnone \ +cache=3Dnone \ -device virtio-blk-ccw,scsi=3Doff,devno=3Dfe.0.0002,drive=3Ddrive-virtio-d= isk2,\ -id=3Dvirtio-disk2,write-cache=3Don \ +id=3Dvirtio-disk2,write-cache=3Don,werror=3Dreport,rerror=3Dignore \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ resourcecontrol=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.ar= gs b/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.args index 7daddc1d87..0d9254e1ae 100644 --- a/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.args +++ b/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.args @@ -27,17 +27,17 @@ file=3D/tmp/lib/domain--1-guest/master-key.aes \ -no-shutdown \ -boot strict=3Don \ -drive file=3D/var/images/image1,format=3Dqcow2,if=3Dnone,id=3Ddrive-virti= o-disk0,\ -werror=3Dstop,rerror=3Dstop,cache=3Dnone \ +cache=3Dnone \ -device virtio-blk-ccw,scsi=3Doff,devno=3Dfe.0.0000,drive=3Ddrive-virtio-d= isk0,\ -id=3Dvirtio-disk0,bootindex=3D1,write-cache=3Don \ +id=3Dvirtio-disk0,bootindex=3D1,write-cache=3Don,werror=3Dstop,rerror=3Dst= op \ -drive file=3D/var/images/image2,format=3Dqcow2,if=3Dnone,id=3Ddrive-virti= o-disk1,\ -werror=3Denospc,cache=3Dnone \ +cache=3Dnone \ -device virtio-blk-ccw,scsi=3Doff,devno=3Dfe.0.0001,drive=3Ddrive-virtio-d= isk1,\ -id=3Dvirtio-disk1,write-cache=3Don \ +id=3Dvirtio-disk1,write-cache=3Don,werror=3Denospc \ -drive file=3D/var/images/image3,format=3Dqcow2,if=3Dnone,id=3Ddrive-virti= o-disk2,\ -werror=3Dreport,rerror=3Dignore,cache=3Dnone \ +cache=3Dnone \ -device virtio-blk-ccw,scsi=3Doff,devno=3Dfe.0.0002,drive=3Ddrive-virtio-d= isk2,\ -id=3Dvirtio-disk2,write-cache=3Don \ +id=3Dvirtio-disk2,write-cache=3Don,werror=3Dreport,rerror=3Dignore \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ resourcecontrol=3Ddeny \ -msg timestamp=3Don --=20 2.25.1