From patchwork Wed Mar 27 17:32:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 10873819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F16D0922 for ; Wed, 27 Mar 2019 17:34:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D043A2793B for ; Wed, 27 Mar 2019 17:34:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C067928608; Wed, 27 Mar 2019 17:34:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7012F28536 for ; Wed, 27 Mar 2019 17:34:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h9CPR-00049v-Te; Wed, 27 Mar 2019 17:32:17 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h9CPQ-00049g-2K for xen-devel@lists.xenproject.org; Wed, 27 Mar 2019 17:32:16 +0000 X-Inumbo-ID: 42e332e5-50b6-11e9-bc90-bc764e045a96 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 42e332e5-50b6-11e9-bc90-bc764e045a96; Wed, 27 Mar 2019 17:32:14 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,277,1549929600"; d="scan'208";a="81999336" From: Paul Durrant To: , , Date: Wed, 27 Mar 2019 17:32:04 +0000 Message-ID: <20190327173206.9065-1-paul.durrant@citrix.com> X-Mailer: git-send-email 2.20.1.2.gb21ebb6 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 0/2] xen-block: fix sector size confusion X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Stefano Stabellini , Max Reitz , Paul Durrant , Stefan Hajnoczi , Anthony Perard Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The Xen blkif protocol is confusing but discussion with the maintainer has clarified that sector based quantities in requests and the 'sectors' value advertized in xenstore should always be in terms of 512-byte units and not the advertised logical 'sector-size' value. This series fixes xen-block to adhere to the spec. Paul Durrant (2): xen-block: scale sector based quantities correctly xen-block: always report 'sectors' in terms of 512-byte units hw/block/dataplane/xen-block.c | 28 +++++++++++++--------------- hw/block/xen-block.c | 2 +- hw/block/xen_blkif.h | 2 ++ 3 files changed, 16 insertions(+), 16 deletions(-) --- v2: - Split up previous single patch Cc: Anthony Perard Cc: Kevin Wolf Cc: Max Reitz Cc: Stefan Hajnoczi Cc: Stefano Stabellini