From nobody Sat Apr 27 06:56:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605615470; cv=none; d=zohomail.com; s=zohoarc; b=kJVdrbqiy21fBCZwsT2AsGZ0cGRerv795UAFjLeQnfnF84O371vW3+l+u79pblGOdjFVK/1w8XmT5Q40/NVFo/RYyFSUaav47h87G4Xuy655/F2YB8A8jjbqdqp5/Sx++nd2Laab7OPBpjaW3qI39hzDQfX0JJ94z60qc+k8JU0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605615470; h=Content-Type:Content-Transfer-Encoding:Cc: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=MsxXkIhF01+c5mYUNzcpRyzD+aT+05ACEJDrxdECM3w=; b=P4xaLLY58AX7CW3O6O21eP+P2rPhvjB9VA2l6KCbs2MT0tqpY26GlOfhBaLaP6L8uoznyzJ3iB8fNQ1nHm6HiCY/X71HD6kBoElqYaDaXCA1z+S/QPPG1xG8Yrk4+oT8oaMz8M/ieCNWBQEeKynlMwsHL0DLbVjYyZUwGTClUmU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16056154704901003.2590988613412; Tue, 17 Nov 2020 04:17:50 -0800 (PST) Received: from localhost ([::1]:33548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kezvh-00043l-5f for importer@patchew.org; Tue, 17 Nov 2020 07:17:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kezuB-0002OZ-Ij for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:15 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kezuA-0002el-0D for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:15 -0500 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-151-U0odU1Y0MKar5tuKauM71g-1; Tue, 17 Nov 2020 07:16:09 -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 224F387951F; Tue, 17 Nov 2020 12:16:08 +0000 (UTC) Received: from merkur.redhat.com (ovpn-114-113.ams2.redhat.com [10.36.114.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 254AD10013D0; Tue, 17 Nov 2020 12:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605615373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MsxXkIhF01+c5mYUNzcpRyzD+aT+05ACEJDrxdECM3w=; b=DWX8HFrz4yJm+R7NRka4kgQhFXdi5Yc9SjzbZCEHFjpK8GFWDzvWsP0PbOMPUI9uXp1Pm6 RrglgEDWPUjQExMnsBL1egX1Ud4CtapScmAcFYd9Cnw9f45DltBVPcnaobTqOh+/zZKwKn 0B4gLBrBixku7oSYtDXJOCsvRtGuz9Q= X-MC-Unique: U0odU1Y0MKar5tuKauM71g-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 1/7] char-stdio: Fix QMP default for 'signal' Date: Tue, 17 Nov 2020 13:15:52 +0100 Message-Id: <20201117121558.249585-2-kwolf@redhat.com> In-Reply-To: <20201117121558.249585-1-kwolf@redhat.com> References: <20201117121558.249585-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kwolf@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/17 01:18:45 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Commit 02c4bdf1 tried to make signal=3Don the default for stdio chardevs except for '-serial mon:stdio', but it forgot about QMP and accidentally switched the QMP default from true (except for -nographic) to false (always). The documentation was kept unchanged and still describes the opposite of the old behaviour (which is an even older documentation bug). Fix all of this by making signal=3Dtrue the default in ChardevStdio and documenting it as such. Fixes: 02c4bdf1d2ca8c02a9bae16398f260b5c08d08bf Signed-off-by: Kevin Wolf Message-Id: <20201023101222.250147-2-kwolf@redhat.com> Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Markus Armbruster Signed-off-by: Kevin Wolf --- qapi/char.json | 3 +-- chardev/char-stdio.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/qapi/char.json b/qapi/char.json index b4d66ec90b..43486d1daa 100644 --- a/qapi/char.json +++ b/qapi/char.json @@ -321,8 +321,7 @@ # Configuration info for stdio chardevs. # # @signal: Allow signals (such as SIGINT triggered by ^C) -# be delivered to qemu. Default: true in -nographic mode, -# false otherwise. +# be delivered to qemu. Default: true. # # Since: 1.5 ## diff --git a/chardev/char-stdio.c b/chardev/char-stdio.c index 82eaebc1db..403da308c9 100644 --- a/chardev/char-stdio.c +++ b/chardev/char-stdio.c @@ -112,9 +112,7 @@ static void qemu_chr_open_stdio(Chardev *chr, =20 qemu_chr_open_fd(chr, 0, 1); =20 - if (opts->has_signal) { - stdio_allow_signal =3D opts->signal; - } + stdio_allow_signal =3D !opts->has_signal || opts->signal; qemu_chr_set_echo_stdio(chr, false); } #endif --=20 2.28.0 From nobody Sat Apr 27 06:56:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605615470; cv=none; d=zohomail.com; s=zohoarc; b=XlLvMSXqxYCuUiulmmtt25J7ujxO75brZc/jsqFT2DAW7SDVwWnQ0zyZChLrgANHspX+fCgRSEp0ChpETaGPAad87dcEVMzNraMZQVHaCW9veBm0NPS/G7wm5TLdf+2yDuiNxxe/Pmrqa9pdneMcJ2j+gM3bA/dxSM9ul3fFvyw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605615470; h=Content-Type:Content-Transfer-Encoding:Cc: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=wRXR5ncwgdfbU6vxlX3LKhTpONQFgT53lx1c9qfjMPA=; b=XW1ElY4DK3AZcCROqQbOmThM8CgunNKGPzeDJrxxbYOcwqBMi78PPP63/sjWZ/BFPQOgQEm1TBg6fegtbvMFKEbZp2swsaBGc2J7ndj56qeayyK9Ostwq7XWGAyU3YJu4fhWpzTxQA/y2uaOkR7oBJJoMVq14oYcPya26BkKT2o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1605615470614809.1119531286284; Tue, 17 Nov 2020 04:17:50 -0800 (PST) Received: from localhost ([::1]:33524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kezvh-00043C-Cy for importer@patchew.org; Tue, 17 Nov 2020 07:17:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kezuC-0002PR-1H for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:16 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:21870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kezuA-0002ek-8O for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:15 -0500 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-360-N78QrSzqOuWPXbcI-ERJkQ-1; Tue, 17 Nov 2020 07:16:10 -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 73B9F10753F1; Tue, 17 Nov 2020 12:16:09 +0000 (UTC) Received: from merkur.redhat.com (ovpn-114-113.ams2.redhat.com [10.36.114.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6BBEA10013D0; Tue, 17 Nov 2020 12:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605615373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wRXR5ncwgdfbU6vxlX3LKhTpONQFgT53lx1c9qfjMPA=; b=YsvoaH8XO5Fq6PAhwjBdsgrafJkOBwXN2mzuuU9+hAoyzn3MK6mjpcbjbFIUtUUINeczQu X6oM6Gb55Rf45kGSq20NCidTWbg/y9Do2Pl5gveHn31G5UvgyBll2JESgxtz8Idg2wuKMQ VK/QLIFWzTBOebcc8D94ZqwodY3njOg= X-MC-Unique: N78QrSzqOuWPXbcI-ERJkQ-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 2/7] iotests: Replace deprecated ConfigParser.readfp() Date: Tue, 17 Nov 2020 13:15:53 +0100 Message-Id: <20201117121558.249585-3-kwolf@redhat.com> In-Reply-To: <20201117121558.249585-1-kwolf@redhat.com> References: <20201117121558.249585-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kwolf@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/17 00:41:22 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) iotest 277 fails on Fedora 33 (Python 3.9) because a deprecation warning changes the output: nbd-fault-injector.py:230: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead. In fact, readfp() has already been deprecated in Python 3.2 and the replacement has existed since the same version, so we can now unconditionally switch to read_file(). Signed-off-by: Kevin Wolf Message-Id: <20201113100602.15936-1-kwolf@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Kevin Wolf --- tests/qemu-iotests/nbd-fault-injector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/nbd-fault-injector.py b/tests/qemu-iotests/= nbd-fault-injector.py index 78f42c4214..6e11ef89b8 100755 --- a/tests/qemu-iotests/nbd-fault-injector.py +++ b/tests/qemu-iotests/nbd-fault-injector.py @@ -227,7 +227,7 @@ def parse_config(config): def load_rules(filename): config =3D configparser.RawConfigParser() with open(filename, 'rt') as f: - config.readfp(f, filename) + config.read_file(f, filename) return parse_config(config) =20 def open_socket(path): --=20 2.28.0 From nobody Sat Apr 27 06:56:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605615476; cv=none; d=zohomail.com; s=zohoarc; b=gZhY2lbD8ic7jss7iP/VYXVfFIz+A03bK43aULCXKoWupyJsnRP40ZG9UgkM5687qKzxkRW/xZERHeOK/ApShoAbeVQzJ22rWTMduJA/Q4CR+EdXIYJff64Y1jUn5OZYm355+sjp7Fk1pI173fXibYSxb3OWAFx9j2+qReLfDqQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605615476; h=Content-Type:Content-Transfer-Encoding:Cc: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=NPwnPjGTI0xkMPmJHl6JkXDRnlvL0iyeVRVlhFPIBGA=; b=Xqy4zWN0M3NHm/JqwkSwXYn1kciyNDq9pncMrZQUWUgY2jaDH5hCImvt4SCXmy6gk9bhw2KoaSzTMAguMP+HR0EyYCuEfuaw7CgOmi6+7T90gr1CFLaOYr+agFylgqGJVDByhJyJm4zgz1sLSb349a0BaO4+IC9QFZa5QDExpL0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1605615476549802.3506055361547; Tue, 17 Nov 2020 04:17:56 -0800 (PST) Received: from localhost ([::1]:33780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kezvm-00049G-HU for importer@patchew.org; Tue, 17 Nov 2020 07:17:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kezuE-0002Sy-8u for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:28433) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kezuA-0002f0-PH for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:17 -0500 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-385-VV0A4tJpP4i1gtJXiO0RuA-1; Tue, 17 Nov 2020 07:16:11 -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 ADB7E18CB72A; Tue, 17 Nov 2020 12:16:10 +0000 (UTC) Received: from merkur.redhat.com (ovpn-114-113.ams2.redhat.com [10.36.114.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC53C10013D7; Tue, 17 Nov 2020 12:16:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605615374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NPwnPjGTI0xkMPmJHl6JkXDRnlvL0iyeVRVlhFPIBGA=; b=flj51Qb5jmxm+69WKblcBGQCkB7etFD0Fk1fyMs9vWUQBN33CyIg/UphRKWPAf0Lxlbjko ipmFsx+LQxHfR1pZVj65LNh0sJrYfYBW+JzzORn5akkpu7tifV0WFTelNRIDbQ1oV2FlpD vQwbTcD6I+ik+BWxC6p9G/V+d6Jif8k= X-MC-Unique: VV0A4tJpP4i1gtJXiO0RuA-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 3/7] file-posix: allow -EBUSY errors during write zeros on raw block devices Date: Tue, 17 Nov 2020 13:15:54 +0100 Message-Id: <20201117121558.249585-4-kwolf@redhat.com> In-Reply-To: <20201117121558.249585-1-kwolf@redhat.com> References: <20201117121558.249585-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kwolf@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/17 01:18:45 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Maxim Levitsky On Linux, fallocate(fd, FALLOC_FL_PUNCH_HOLE) when it is used on a block de= vice, without O_DIRECT can return -EBUSY if it races with another write to the sa= me page. Since this is rare and discard is not a critical operation, ignore this err= or Signed-off-by: Maxim Levitsky Message-Id: <20201111153913.41840-2-mlevitsk@redhat.com> Signed-off-by: Kevin Wolf --- block/file-posix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/file-posix.c b/block/file-posix.c index c63926d592..d5fd1dbcd2 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1698,6 +1698,7 @@ static int handle_aiocb_write_zeroes_unmap(void *opaq= ue) switch (ret) { case -ENOTSUP: case -EINVAL: + case -EBUSY: break; default: return ret; --=20 2.28.0 From nobody Sat Apr 27 06:56:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605615569; cv=none; d=zohomail.com; s=zohoarc; b=m+ozL4iLhBbiVUF0uhVj0jfvZpxptjWno7EtHGlLFgJnikDZGA0sA5ejpO4M7M5Imb5ampd92QPiTSrncnsE8nNdp7WDsV7Oh9wASWuuowVn/LJBsMOQQfbrASmEMG/WPXlw/0qSELXo5pYA0s0jqCdCSkrgTNWg9C6eQTb4RLI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605615569; h=Content-Type:Content-Transfer-Encoding:Cc: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=Kex36pk3BcbK1DC/FgDwPMEV9SdKUEjh3aGWL3QEZf4=; b=Ew8K9SddB88dtAOc6+uoBqtpt4zbE6d/M1X4cixQthV7rhs83Y/gm5ns7wwnShC+AtRRyhrri7beuwI4OgqlIUf+8UQkihAfFH/8xaDkRIUbPjJasds41e7HgaW46nVDhQ7nffRhfTSPy2+ZY3lR0REdy0LcfeMZFoWfQ91g8Wk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16056155693451015.6832173505202; Tue, 17 Nov 2020 04:19:29 -0800 (PST) Received: from localhost ([::1]:41180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kezxI-00077L-CF for importer@patchew.org; Tue, 17 Nov 2020 07:19:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kezuE-0002UC-OH for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44059) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kezuD-0002hC-3R for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:18 -0500 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-479-RYO-t-fXObS1o1qZ2OCfyA-1; Tue, 17 Nov 2020 07:16:13 -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 F29FC8015FB; Tue, 17 Nov 2020 12:16:11 +0000 (UTC) Received: from merkur.redhat.com (ovpn-114-113.ams2.redhat.com [10.36.114.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0426D10013D0; Tue, 17 Nov 2020 12:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605615376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kex36pk3BcbK1DC/FgDwPMEV9SdKUEjh3aGWL3QEZf4=; b=fwoibFrzmQRvJoBe5x/WtVsOB+5Lot9bWgLBWKn/VZbvVdpVDxMRSrgmeM+6PnRxOB9hQw jkjtU5x85Tjpn4+40ScWdhSaufrMwjqU2mb3fcEYn9NPQbzsDLOt9QPmHikuRO9NHptZok z0qYvUMgGmXQXXUUyIDbybjLeNqrbx0= X-MC-Unique: RYO-t-fXObS1o1qZ2OCfyA-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 4/7] io_uring: do not use pointer after free Date: Tue, 17 Nov 2020 13:15:55 +0100 Message-Id: <20201117121558.249585-5-kwolf@redhat.com> In-Reply-To: <20201117121558.249585-1-kwolf@redhat.com> References: <20201117121558.249585-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kwolf@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/17 01:18:45 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Paolo Bonzini Even though only the pointer value is only printed, it is untidy and Coverity complains. Cc: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20201113154102.1460459-1-pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Kevin Wolf --- block/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/io_uring.c b/block/io_uring.c index 037af09471..00a3ee9fb8 100644 --- a/block/io_uring.c +++ b/block/io_uring.c @@ -425,6 +425,6 @@ LuringState *luring_init(Error **errp) void luring_cleanup(LuringState *s) { io_uring_queue_exit(&s->ring); - g_free(s); trace_luring_cleanup_state(s); + g_free(s); } --=20 2.28.0 From nobody Sat Apr 27 06:56:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605615650; cv=none; d=zohomail.com; s=zohoarc; b=BeGdYDQjz+LEqMHJENZHIqUXepQEg3kXXZnfRerheaiCGlqdkZzOJG8AY3DK3j/P3bsFxvw64fF1FVYuK347ixtrApuCVr1Lileo9tbsNr3a2zXLGhmdeenF67J7C25dI52zE6H3dPOPXJu8FNgGmMMM452s7+wyt1nrtwaEc2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605615650; h=Content-Type:Content-Transfer-Encoding:Cc: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=MHw0RbpZ2HsFdCtkvNdSz1Vz5v6AvHQHy7Y6JprKkXQ=; b=WIgBpCHnG/odbQf4WjHNxdXWv08ud5WXWdceY7WPcf7cYji/Whk2TYy5EtDh3NfuLhbwgYJ0MD65UYiNcZ4nTfPNbrdBnlGpv9WjMmuIdHd3ivS2Pw6bDUDW2Z9guaHLWJh4dZhuLAN1NDkNI+EcbLD2Vf06CwXX3bSOSjml+vo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1605615650285250.2257111461422; Tue, 17 Nov 2020 04:20:50 -0800 (PST) Received: from localhost ([::1]:44362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kezyb-0008OS-6f for importer@patchew.org; Tue, 17 Nov 2020 07:20:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kezuF-0002Vm-CT for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:19 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:55573) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kezuD-0002hN-Mj for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:19 -0500 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-5-ewAn3toCMH2u-5MT5w_rjQ-1; Tue, 17 Nov 2020 07:16:14 -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 4042718CB726; Tue, 17 Nov 2020 12:16:13 +0000 (UTC) Received: from merkur.redhat.com (ovpn-114-113.ams2.redhat.com [10.36.114.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 479A910013D0; Tue, 17 Nov 2020 12:16:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605615377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MHw0RbpZ2HsFdCtkvNdSz1Vz5v6AvHQHy7Y6JprKkXQ=; b=RyH3E0NlUtKGFZ+uhjHgbfUwdFTm89ovKn5UoQ9vZYqzu0LI1IEu29U3bcSgojCMSbkamY Au598W8a0sp2mv/jGOM4ZqpTWffuQYB2uXHZwV+NUjbkSoxLaS8deJMF92QTXQuRsDIymB DntLRSpK05P3WH85zt6+7CXlO/OQKWM= X-MC-Unique: ewAn3toCMH2u-5MT5w_rjQ-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 5/7] quorum: Require WRITE perm with rewrite-corrupted Date: Tue, 17 Nov 2020 13:15:56 +0100 Message-Id: <20201117121558.249585-6-kwolf@redhat.com> In-Reply-To: <20201117121558.249585-1-kwolf@redhat.com> References: <20201117121558.249585-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kwolf@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/17 01:18:45 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Max Reitz Using rewrite-corrupted means quorum may issue writes to its children just from receiving read requests from its parents. Thus, it must take the WRITE permission when rewrite-corrupted is used. Signed-off-by: Max Reitz Message-Id: <20201113211718.261671-2-mreitz@redhat.com> Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- block/quorum.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index e846a7e892..b10fc2089e 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -1163,7 +1163,12 @@ static void quorum_child_perm(BlockDriverState *bs, = BdrvChild *c, uint64_t perm, uint64_t shared, uint64_t *nperm, uint64_t *nshared) { + BDRVQuorumState *s =3D bs->opaque; + *nperm =3D perm & DEFAULT_PERM_PASSTHROUGH; + if (s->rewrite_corrupted) { + *nperm |=3D BLK_PERM_WRITE; + } =20 /* * We cannot share RESIZE or WRITE, as this would make the --=20 2.28.0 From nobody Sat Apr 27 06:56:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605615782; cv=none; d=zohomail.com; s=zohoarc; b=nuogkz0RzsBcKZFoV3LBsyhYb4xWoG+Zvu72XbmzsPEdaFn4GDKHcDqgYW5Q3a8Pd2+jOC37rLPBRUTsogF4X8nLhuCX2c7HkWeEwok0KIb7fSNHTVFw7H5qyHOJf/zt8lL/4EsRprXGjf/rSGMvso18hSh/W0EFYCZOyGIw6zk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605615782; h=Content-Type:Content-Transfer-Encoding:Cc: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=OoC4a8OqMJX1aI5Tz3lxbHtdObVtnsjOt2I+cEEbfqU=; b=GAwJ4cE3mLlV8CW1vOopQKm+COkVWUAxtiK/Bcl6Ka0KW13gKIvyd1k/qfky2c3SFY/OlimB5PVwwVhDpijDKybaWm3NJSfDPHeUUBPfxNPiCAMe4YcqqoAiumAgBcOuQNqDE8ny8XLm+b0CAQSa0TA5RdHLyeolCyrpgiqyr9Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160561578214946.521466249069135; Tue, 17 Nov 2020 04:23:02 -0800 (PST) Received: from localhost ([::1]:47440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kf00i-0001Kf-SZ for importer@patchew.org; Tue, 17 Nov 2020 07:23:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kezuW-0002Z7-9O for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:35102) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kezuK-0002jl-5N for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:29 -0500 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-103-7rB7MRHMMkSiyvmVDLfmcg-1; Tue, 17 Nov 2020 07:16:15 -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 7F3D764144; Tue, 17 Nov 2020 12:16:14 +0000 (UTC) Received: from merkur.redhat.com (ovpn-114-113.ams2.redhat.com [10.36.114.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 880BE10013D0; Tue, 17 Nov 2020 12:16:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605615381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OoC4a8OqMJX1aI5Tz3lxbHtdObVtnsjOt2I+cEEbfqU=; b=JAtc4IH6kcILHh4jIl8kGsZYJa6XdptZx5RZKTxeg/VDRbrcX4OHUzuBIe2ShJeMoKKiCR E4YbzSyps7oTGUF49TItvcG6R4Hj3F1p29wAJxjzq1Qo/sbUw75qnyOjZUAaE7Z/NOT5TR +I8/I/Q2dE7ZCklj0onsLa/GjRK9R6c= X-MC-Unique: 7rB7MRHMMkSiyvmVDLfmcg-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 6/7] iotests/081: Filter image format after testdir Date: Tue, 17 Nov 2020 13:15:57 +0100 Message-Id: <20201117121558.249585-7-kwolf@redhat.com> In-Reply-To: <20201117121558.249585-1-kwolf@redhat.com> References: <20201117121558.249585-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kwolf@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/17 01:18:45 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Max Reitz Otherwise, this breaks whenever the test directory contains the image format (e.g. "/tmp/test-raw-file" is filtered to "/tmp/test-IMGFMT-file" instead of "TEST_DIR"). Signed-off-by: Max Reitz Message-Id: <20201113211718.261671-3-mreitz@redhat.com> Signed-off-by: Kevin Wolf --- tests/qemu-iotests/081 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081 index 537d40dfd5..253b7576be 100755 --- a/tests/qemu-iotests/081 +++ b/tests/qemu-iotests/081 @@ -45,15 +45,16 @@ _require_drivers quorum =20 do_run_qemu() { - echo Testing: "$@" | _filter_imgfmt + echo Testing: "$@" $QEMU -nographic -qmp stdio -serial none "$@" echo } =20 run_qemu() { - do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp\ - | _filter_qemu_io | _filter_generated_node_ids + do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_imgfmt | _filter_qem= u \ + | _filter_qmp | _filter_qemu_io \ + | _filter_generated_node_ids } =20 quorum=3D"driver=3Draw,file.driver=3Dquorum,file.vote-threshold=3D2" --=20 2.28.0 From nobody Sat Apr 27 06:56:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605615568; cv=none; d=zohomail.com; s=zohoarc; b=G5qtj2/sdyKsCtoenmkXFJ8eUkt7m1toSXadpvx7fpcIQ/dhUxFGJxnRCV4VPz7uKoexjmv6qe683NxjcK7ztZA8n8IXBJfmLdxaCjQM20L8OFSPmjc4M9WbYPBUUIEen18zxIJnltPB9UKo7zlLjiWXL1V2Itb08rWcIB3I6HE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605615568; h=Content-Type:Content-Transfer-Encoding:Cc: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=0mQJbM/9DQsgu+0544X/GcuXqB5Nc5QMqfzmDY9E92A=; b=OGsSkdM+rWuv4bw0iM7bNUGlSCp+VFSM3rzlgtCc+1LCIsnGcHfm14z2eqCiJGG9c3pCWNuQJEVGifIqcwxh/8weLXA5MtUDUSfMqUc3+WX3VNndRJSjRnjbvAgbhj8eGbuTTEEnYN8inkfpi6RAJCOs9ouV4XgTOmVpG57FEKY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1605615568884393.8705392324073; Tue, 17 Nov 2020 04:19:28 -0800 (PST) Received: from localhost ([::1]:41136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kezxH-00076J-Rr for importer@patchew.org; Tue, 17 Nov 2020 07:19:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kezuW-0002ZA-B4 for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:44624) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kezuI-0002jf-60 for qemu-devel@nongnu.org; Tue, 17 Nov 2020 07:16:29 -0500 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-288-a8SMFGlIOv-0ozcY6OvMWQ-1; Tue, 17 Nov 2020 07:16:16 -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 C73A610B9CA3; Tue, 17 Nov 2020 12:16:15 +0000 (UTC) Received: from merkur.redhat.com (ovpn-114-113.ams2.redhat.com [10.36.114.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id C797110013D0; Tue, 17 Nov 2020 12:16:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605615380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0mQJbM/9DQsgu+0544X/GcuXqB5Nc5QMqfzmDY9E92A=; b=CRLmPDT2jGGu7hHY9GQOyHCSvM6yrke5PWhFLmiJknq7Ex6YtaYtBRKC7TquQzeC7nGfQ6 DVtxvmQUyiNrb157hPSJgoT4e3HPtdKw82SAx/xr27OhQtr4WmvbnmW0m5QdS96ghzRYhX xV20ZTSCa1tea4Yfqn5iYwhGWK1gh20= X-MC-Unique: a8SMFGlIOv-0ozcY6OvMWQ-1 From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PULL 7/7] iotests/081: Test rewrite-corrupted without WRITE Date: Tue, 17 Nov 2020 13:15:58 +0100 Message-Id: <20201117121558.249585-8-kwolf@redhat.com> In-Reply-To: <20201117121558.249585-1-kwolf@redhat.com> References: <20201117121558.249585-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kwolf@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/17 00:41:22 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Max Reitz Test what happens when a rewrite-corrupted quorum node performs such a rewrite, while there is no parent that has taken the WRITE permission. Signed-off-by: Max Reitz Message-Id: <20201113211718.261671-4-mreitz@redhat.com> Signed-off-by: Kevin Wolf --- tests/qemu-iotests/081 | 54 ++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/081.out | 27 +++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081 index 253b7576be..4e19972931 100755 --- a/tests/qemu-iotests/081 +++ b/tests/qemu-iotests/081 @@ -42,6 +42,7 @@ _supported_fmt raw _supported_proto file _supported_os Linux _require_drivers quorum +_require_devices virtio-scsi =20 do_run_qemu() { @@ -155,6 +156,59 @@ echo "=3D=3D checking that quorum has corrected the co= rrupted file =3D=3D" =20 $QEMU_IO -c "read -P 0x32 0 $size" "$TEST_DIR/2.raw" | _filter_qemu_io =20 +echo +echo "=3D=3D using quorum rewrite corrupted mode without WRITE permission = =3D=3D" + +# The same as above, but this time, do it on a quorum node whose only +# parent will not take the WRITE permission + +echo '-- corrupting --' +# Only corrupt a portion: The guest device (scsi-hd on virtio-scsi) +# will read some data (looking for a partition table to guess the +# disk's geometry), which would trigger a quorum mismatch if the +# beginning of the image was corrupted. The subsequent +# QUORUM_REPORT_BAD event would be suppressed (because at that point, +# there cannot have been a qmp_capabilities on the monitor). Because +# that event is rate-limited, the next QUORUM_REPORT_BAD that happens +# thanks to our qemu-io read (which should trigger a mismatch) would +# then be delayed past the VM quit and not appear in the output. +# So we keep the first 1M intact to see a QUORUM_REPORT_BAD resulting +# from the qemu-io invocation. +$QEMU_IO -c "write -P 0x42 1M 1M" "$TEST_DIR/2.raw" | _filter_qemu_io + +# Fix the corruption (on a read-only quorum node, i.e. without taking +# the WRITE permission on it -- its child nodes need to be R/W OTOH, +# so that rewrite-corrupted works) +echo +echo '-- running quorum --' +run_qemu \ + -blockdev file,node-name=3Dfile1,filename=3D"$TEST_DIR/1.raw" \ + -blockdev file,node-name=3Dfile2,filename=3D"$TEST_DIR/2.raw" \ + -blockdev file,node-name=3Dfile3,filename=3D"$TEST_DIR/3.raw" \ + -blockdev '{ + "driver": "quorum", + "node-name": "quorum", + "read-only": true, + "vote-threshold": 2, + "rewrite-corrupted": true, + "children": [ "file1", "file2", "file3" ] + }' \ + -device virtio-scsi,id=3Dscsi \ + -device scsi-hd,id=3Dquorum-drive,bus=3Dscsi.0,drive=3Dquorum \ + <