From nobody Wed Nov 5 18:21:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1537173189976942.7601255865862; Mon, 17 Sep 2018 01:33:09 -0700 (PDT) Received: from localhost ([::1]:34391 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1oxm-0004ne-SK for importer@patchew.org; Mon, 17 Sep 2018 04:32:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1owk-0004Tk-UJ for qemu-devel@nongnu.org; Mon, 17 Sep 2018 04:31:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1owg-0007m0-Nu for qemu-devel@nongnu.org; Mon, 17 Sep 2018 04:31:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41104) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g1owg-0007bO-Fj for qemu-devel@nongnu.org; Mon, 17 Sep 2018 04:31:50 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BAE8F308FC4E for ; Mon, 17 Sep 2018 08:31:48 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-19.pek2.redhat.com [10.72.12.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 11162308BDA0; Mon, 17 Sep 2018 08:31:44 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Mon, 17 Sep 2018 16:31:38 +0800 Message-Id: <20180917083138.3948-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 17 Sep 2018 08:31:48 +0000 (UTC) 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] [RFC PATCH] scsi-block: Deprecate rotation_rate X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Fam Zheng Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This option is added together with scsi-disk but is never honoured, becuase we don't emulate the VPD page for scsi-block. We could intercept and inject the user specified value like for max xfer len, but it's probably not helpful since the intent of 070f80095ad was for random entropy aspects, not for performance. If emulated rotation rate is desired, scsi-hd is more suitable. Signed-off-by: Fam Zheng --- RFC to discuss about if we want to keep the option. Another possibility is, naturally, to actually write code to make use of the option. --- hw/scsi/scsi-disk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 5ae7baa082..c43163cef4 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2610,6 +2610,12 @@ static void scsi_block_realize(SCSIDevice *dev, Erro= r **errp) return; } =20 + if (s->rotation_rate) { + error_report_once("rotation_rate is specified for scsi-block but i= s " + "not implemented. This option is deprecated and = will " + "be removed in a future version"); + } + /* check we are using a driver managing SG_IO (version 3 and after) */ rc =3D blk_ioctl(s->qdev.conf.blk, SG_GET_VERSION_NUM, &sg_version); if (rc < 0) { --=20 2.17.1