From nobody Thu Apr 25 05:10:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562939623; cv=none; d=zoho.com; s=zohoarc; b=REw7o7A/Mg/wGTXy6sUse+AhfJZHY0c+Goq1roZg3mMOywksbcnABTSYCwV7mxIxjx2WoF3BJOIsSnBXiYIfPJb7c/OR3Sc8GDatGhrlKCa0WjacjDnXMNGow/eIrJrDGun/tJ5O07s+jxKGQzmtBM++/kEMaUsW3FOzCsItayU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562939623; h=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:ARC-Authentication-Results; bh=uKTrAqE5mtBu3yfY0JAbCwMIrQ68RBIeY4NWB/NM2KI=; b=J8Gzgfz3wBLlrHrLc7+8G8oJnmaOc8t3McDGCuxbJRIkGlZrrXVdwi97uyfN3GGhDMjZ32oPnkeSM3pQ3oIgEnS3SQtn2Cwp8ED6DZCOPSxv6+hru3fxSczhCJahPNA8Plhy5ISEnNbLzFppNMK5e7MKpz4IOpOJLnnMpIOtlgI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1562939623302604.2227587873062; Fri, 12 Jul 2019 06:53:43 -0700 (PDT) Received: from localhost ([::1]:49672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlvzX-0005Ln-UT for importer@patchew.org; Fri, 12 Jul 2019 09:53:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32957) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlvz2-0003gD-D5 for qemu-devel@nongnu.org; Fri, 12 Jul 2019 09:53:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlvz0-0001aS-3m for qemu-devel@nongnu.org; Fri, 12 Jul 2019 09:53:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52332) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hlvyv-0001W7-Ha; Fri, 12 Jul 2019 09:53:01 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0DA4DF26; Fri, 12 Jul 2019 13:53:00 +0000 (UTC) Received: from dhcp-200-226.str.redhat.com (dhcp-200-226.str.redhat.com [10.33.200.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4A2B5D739; Fri, 12 Jul 2019 13:52:59 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 12 Jul 2019 15:52:52 +0200 Message-Id: <20190712135253.9410-2-kwolf@redhat.com> In-Reply-To: <20190712135253.9410-1-kwolf@redhat.com> References: <20190712135253.9410-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 12 Jul 2019 13:53:00 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/2] iotests: Update 082 expected output 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" Content-Type: text/plain; charset="utf-8" From: Eric Blake A recent tweak to the '-o help' output for qemu-img needs to be reflected into the iotests expected outputs. Fixes: f7077c98 Reported-by: Kevin Wolf Signed-off-by: Eric Blake Reviewed-by: John Snow Signed-off-by: Kevin Wolf --- tests/qemu-iotests/082.out | 54 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/tests/qemu-iotests/082.out b/tests/qemu-iotests/082.out index 58de358b38..9d4ed4dc9d 100644 --- a/tests/qemu-iotests/082.out +++ b/tests/qemu-iotests/082.out @@ -47,7 +47,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -70,7 +70,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -93,7 +93,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -116,7 +116,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -139,7 +139,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -162,7 +162,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -185,7 +185,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -208,7 +208,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -246,7 +246,7 @@ Supported qcow2 options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -327,7 +327,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -350,7 +350,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -373,7 +373,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -396,7 +396,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -419,7 +419,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -442,7 +442,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -465,7 +465,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -488,7 +488,7 @@ Supported options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -526,7 +526,7 @@ Supported qcow2 options: backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -618,7 +618,7 @@ Creation options for 'qcow2': backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -642,7 +642,7 @@ Creation options for 'qcow2': backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -666,7 +666,7 @@ Creation options for 'qcow2': backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -690,7 +690,7 @@ Creation options for 'qcow2': backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -714,7 +714,7 @@ Creation options for 'qcow2': backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -738,7 +738,7 @@ Creation options for 'qcow2': backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -762,7 +762,7 @@ Creation options for 'qcow2': backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -786,7 +786,7 @@ Creation options for 'qcow2': backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm @@ -827,7 +827,7 @@ Creation options for 'qcow2': backing_file=3D - File name of a base image backing_fmt=3D - Image format of the base image cluster_size=3D - qcow2 cluster size - compat=3D - Compatibility level (0.10 or 1.1) + compat=3D - Compatibility level (v2 [0.10] or v3 [1.1]) data_file=3D - File name of an external data file data_file_raw=3D - The external data file must stay valid= as a raw image encrypt.cipher-alg=3D - Name of encryption cipher algorithm --=20 2.20.1 From nobody Thu Apr 25 05:10:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562939621; cv=none; d=zoho.com; s=zohoarc; b=YtbRmWddRUeJ3MT/4x7UrKyv8Kc5J/9oBLj1EEUfxHhg+Lyu/u4cMuCp3LsN4ZzGv2BARf2Wojqs00Ez1Wc401uV5atGnUoH0BrrBnUihaCOGULhDZhPqU9J77Q6Wgm27dJelhA6JaPkVtARci2uHXi1BPn/zQt/UB3cmliNkVU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562939621; h=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:ARC-Authentication-Results; bh=qWu71g3HgSNIRet+0HojjQ9s7t7jXP3ZYmAMovo45sQ=; b=bSTZn//kDeQMhyVscinOA5Sf0+iFhqVmw4LFs5zPA+Ifsu6GvFmMYLmrGzWXTuvptvcTSGEaEmK7WqPMUpl21w07vl+2eLQ67zMcdvpleA45hfqDnbJu7Kp1n9DxstLNqJQFsKgMXyOTw062kRlyVxN/uHi9mK2+V9j1/VxnhNw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1562939621982578.9797958596838; Fri, 12 Jul 2019 06:53:41 -0700 (PDT) Received: from localhost ([::1]:49666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlvzV-00055v-4y for importer@patchew.org; Fri, 12 Jul 2019 09:53:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32956) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlvz2-0003g1-Cw for qemu-devel@nongnu.org; Fri, 12 Jul 2019 09:53:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlvz0-0001b8-Uk for qemu-devel@nongnu.org; Fri, 12 Jul 2019 09:53:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47474) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hlvyw-0001XX-RO; Fri, 12 Jul 2019 09:53:03 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0C65330821BE; Fri, 12 Jul 2019 13:53:02 +0000 (UTC) Received: from dhcp-200-226.str.redhat.com (dhcp-200-226.str.redhat.com [10.33.200.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D4F65D739; Fri, 12 Jul 2019 13:53:00 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 12 Jul 2019 15:52:53 +0200 Message-Id: <20190712135253.9410-3-kwolf@redhat.com> In-Reply-To: <20190712135253.9410-1-kwolf@redhat.com> References: <20190712135253.9410-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 12 Jul 2019 13:53:02 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] file-posix: Use max transfer length/segment count only for SCSI passthrough 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" Content-Type: text/plain; charset="utf-8" From: Maxim Levitsky Regular kernel block devices (/dev/sda*, /dev/nvme*, etc) don't have max segment size/max segment count hardware requirements exposed to the userspace, but rather the kernel block layer takes care to split the incoming requests that violate these requirements. Allowing the kernel to do the splitting allows qemu to avoid various overheads that arise otherwise from this. This is especially visible in nbd server, exposing as a raw file, a mostly empty qcow2 image over the net. In this case most of the reads by the remote user won't even hit the underlying kernel block device, and therefore most of the overhead will be in the nbd traffic which increases significantly with lower max transfer size. In addition to that even for local block device access the peformance improves a bit due to less traffic between qemu and the kernel when large transfer sizes are used (e.g for image conversion) More info can be found at: https://bugzilla.redhat.com/show_bug.cgi?id=3D1647104 Signed-off-by: Maxim Levitsky Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Pankaj Gupta Signed-off-by: Kevin Wolf --- block/file-posix.c | 54 ++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index ab05b51a66..4479cc7ab4 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1038,15 +1038,13 @@ static void raw_reopen_abort(BDRVReopenState *state) s->reopen_state =3D NULL; } =20 -static int hdev_get_max_transfer_length(BlockDriverState *bs, int fd) +static int sg_get_max_transfer_length(int fd) { #ifdef BLKSECTGET int max_bytes =3D 0; - short max_sectors =3D 0; - if (bs->sg && ioctl(fd, BLKSECTGET, &max_bytes) =3D=3D 0) { + + if (ioctl(fd, BLKSECTGET, &max_bytes) =3D=3D 0) { return max_bytes; - } else if (!bs->sg && ioctl(fd, BLKSECTGET, &max_sectors) =3D=3D 0) { - return max_sectors << BDRV_SECTOR_BITS; } else { return -errno; } @@ -1055,25 +1053,31 @@ static int hdev_get_max_transfer_length(BlockDriver= State *bs, int fd) #endif } =20 -static int hdev_get_max_segments(const struct stat *st) +static int sg_get_max_segments(int fd) { #ifdef CONFIG_LINUX char buf[32]; const char *end; - char *sysfspath; + char *sysfspath =3D NULL; int ret; - int fd =3D -1; + int sysfd =3D -1; long max_segments; + struct stat st; + + if (fstat(fd, &st)) { + ret =3D -errno; + goto out; + } =20 sysfspath =3D g_strdup_printf("/sys/dev/block/%u:%u/queue/max_segments= ", - major(st->st_rdev), minor(st->st_rdev)); - fd =3D open(sysfspath, O_RDONLY); - if (fd =3D=3D -1) { + major(st.st_rdev), minor(st.st_rdev)); + sysfd =3D open(sysfspath, O_RDONLY); + if (sysfd =3D=3D -1) { ret =3D -errno; goto out; } do { - ret =3D read(fd, buf, sizeof(buf) - 1); + ret =3D read(sysfd, buf, sizeof(buf) - 1); } while (ret =3D=3D -1 && errno =3D=3D EINTR); if (ret < 0) { ret =3D -errno; @@ -1090,8 +1094,8 @@ static int hdev_get_max_segments(const struct stat *s= t) } =20 out: - if (fd !=3D -1) { - close(fd); + if (sysfd !=3D -1) { + close(sysfd); } g_free(sysfspath); return ret; @@ -1103,19 +1107,17 @@ out: static void raw_refresh_limits(BlockDriverState *bs, Error **errp) { BDRVRawState *s =3D bs->opaque; - struct stat st; =20 - if (!fstat(s->fd, &st)) { - if (S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode)) { - int ret =3D hdev_get_max_transfer_length(bs, s->fd); - if (ret > 0 && ret <=3D BDRV_REQUEST_MAX_BYTES) { - bs->bl.max_transfer =3D pow2floor(ret); - } - ret =3D hdev_get_max_segments(&st); - if (ret > 0) { - bs->bl.max_transfer =3D MIN(bs->bl.max_transfer, - ret * getpagesize()); - } + if (bs->sg) { + int ret =3D sg_get_max_transfer_length(s->fd); + + if (ret > 0 && ret <=3D BDRV_REQUEST_MAX_BYTES) { + bs->bl.max_transfer =3D pow2floor(ret); + } + + ret =3D sg_get_max_segments(s->fd); + if (ret > 0) { + bs->bl.max_transfer =3D MIN(bs->bl.max_transfer, ret * getpage= size()); } } =20 --=20 2.20.1