From patchwork Tue Feb 13 20:26:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 873166 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zgvcr5Gt4z9t1t for ; Wed, 14 Feb 2018 07:43:08 +1100 (AEDT) Received: from localhost ([::1]:46849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elhPu-0003XB-PV for incoming@patchwork.ozlabs.org; Tue, 13 Feb 2018 15:43:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elhAm-0008HN-79 for qemu-devel@nongnu.org; Tue, 13 Feb 2018 15:27:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elhAj-0007k6-Ce for qemu-devel@nongnu.org; Tue, 13 Feb 2018 15:27:28 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47296 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1elhAe-0007em-3V; Tue, 13 Feb 2018 15:27:20 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A8A278182D17; Tue, 13 Feb 2018 20:27:09 +0000 (UTC) Received: from red.redhat.com (ovpn-122-122.rdu2.redhat.com [10.10.122.122]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3BBC12026DFD; Tue, 13 Feb 2018 20:27:03 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Tue, 13 Feb 2018 14:26:40 -0600 Message-Id: <20180213202701.15858-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 13 Feb 2018 20:27:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 13 Feb 2018 20:27:09 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'eblake@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v8 00/21] add byte-based block_status driver callbacks 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: kwolf@redhat.com, famz@redhat.com, qemu-block@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" There are patches floating around to add NBD_CMD_BLOCK_STATUS, but NBD wants to report status on byte granularity (even if the reporting will probably be naturally aligned to sectors or even much higher levels). I've therefore started the task of converting our block status code to report at a byte granularity rather than sectors. These patches have been around for a while, but it's time to finish it now that 2.12 is open for patches. Based-on: <20180213170529.10858-1-kwolf@redhat.com> (Kevin's [PULL 00/55] Block layer patches) The overall conversion currently looks like: part 1: bdrv_is_allocated (merged, commit 51b0a488, 2.10) part 2: dirty-bitmap (merged, commit ca759622, 2.11) part 3: bdrv_get_block_status (merged, commit f0a9c18f, 2.11) part 4: .bdrv_co_block_status (this series, v7 was here [1]) [1] https://lists.gnu.org/archive/html/qemu-devel/2018-01/msg00954.html Available as a tag at: git fetch git://repo.or.cz/qemu/ericb.git nbd-byte-callback-v8 Since v7: - rebase to master (more iscsi context changes, nvme driver is new) - add a few more R-bys Eric Blake (21): block: Add .bdrv_co_block_status() callback nvme: Drop pointless .bdrv_co_get_block_status() block: Switch passthrough drivers to .bdrv_co_block_status() file-posix: Switch to .bdrv_co_block_status() gluster: Switch to .bdrv_co_block_status() iscsi: Switch cluster_sectors to byte-based iscsi: Switch iscsi_allocmap_update() to byte-based iscsi: Switch to .bdrv_co_block_status() null: Switch to .bdrv_co_block_status() parallels: Switch to .bdrv_co_block_status() qcow: Switch to .bdrv_co_block_status() qcow2: Switch to .bdrv_co_block_status() qed: Switch to .bdrv_co_block_status() raw: Switch to .bdrv_co_block_status() sheepdog: Switch to .bdrv_co_block_status() vdi: Avoid bitrot of debugging code vdi: Switch to .bdrv_co_block_status() vmdk: Switch to .bdrv_co_block_status() vpc: Switch to .bdrv_co_block_status() vvfat: Switch to .bdrv_co_block_status() block: Drop unused .bdrv_co_get_block_status() include/block/block.h | 14 ++--- include/block/block_int.h | 51 +++++++++------ block/io.c | 86 +++++++++++-------------- block/blkdebug.c | 20 +++--- block/commit.c | 2 +- block/file-posix.c | 62 +++++++++--------- block/gluster.c | 70 ++++++++++----------- block/iscsi.c | 157 ++++++++++++++++++++++++---------------------- block/mirror.c | 2 +- block/null.c | 23 +++---- block/nvme.c | 14 ----- block/parallels.c | 22 ++++--- block/qcow.c | 27 ++++---- block/qcow2.c | 24 +++---- block/qed.c | 84 +++++++++---------------- block/raw-format.c | 16 ++--- block/sheepdog.c | 26 ++++---- block/throttle.c | 2 +- block/vdi.c | 45 +++++++------ block/vmdk.c | 38 +++++------ block/vpc.c | 45 ++++++------- block/vvfat.c | 16 +++-- 22 files changed, 404 insertions(+), 442 deletions(-)