From patchwork Fri Mar 1 19:15:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1050405 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=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44B03j6SJVz9s00 for ; Sat, 2 Mar 2019 06:34:25 +1100 (AEDT) Received: from localhost ([127.0.0.1]:43014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gznvL-0008Pf-S4 for incoming@patchwork.ozlabs.org; Fri, 01 Mar 2019 14:34:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gznic-0006VQ-NZ for qemu-devel@nongnu.org; Fri, 01 Mar 2019 14:21:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzniU-0005KQ-28 for qemu-devel@nongnu.org; Fri, 01 Mar 2019 14:21:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56228) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gzndS-0007uV-Qq; Fri, 01 Mar 2019 14:15:55 -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 mx1.redhat.com (Postfix) with ESMTPS id CE05C1441B8; Fri, 1 Mar 2019 19:15:51 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-206.bos.redhat.com [10.18.17.206]) by smtp.corp.redhat.com (Postfix) with ESMTP id ADD191001DE2; Fri, 1 Mar 2019 19:15:45 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Fri, 1 Mar 2019 14:15:38 -0500 Message-Id: <20190301191545.8728-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 01 Mar 2019 19:15:51 +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] [PATCH v3 0/7] bitmaps: add inconsistent bit 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: Fam Zheng , Kevin Wolf , vsementsov@virtuozzo.com, Juan Quintela , Markus Armbruster , Max Reitz , Stefan Hajnoczi , John Snow , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Allow QEMU to read in bitmaps that have the in-use bit set, for the purposes of allowing users to delete those bitmaps. This is chosen in preference to a hard error on load to minimize impact for a non-critical error, but to force the user or management utility to acknowledge that the bitmap is no longer viable. 1. Changed wording of meaning of persistent bit, inconsistent bit Declining to optimize to avoid allocations for this revision. 2. Add Reviewed-by from Eric. 3. Split into several patches that are more single-purpose, which highlights the individual fixes more clearly; - Prohibit BUSY or INCONSISTENT bitmaps from being merge sources. 4. Declining feedback to prohibit disabling or enabling readonly bitmaps, on the basis that users may wish to enable/disable them prior to remounting their backing storage RW. Decided to prohibit attempting to remove readonly bitmaps, so the failure happens earlier. Prohibit sync=incremental backups using readonly bitmaps, because they're not capable of clearing the bitmap on success. sync=differential would be acceptable here. (Good spot, Vladimir.) John Snow (7): block/dirty-bitmaps: add inconsistent bit block/dirty-bitmap: add inconsistent status block/dirty-bitmaps: add block_dirty_bitmap_check function block/dirty-bitmaps: prohibit readonly bitmaps for backups block/dirty-bitmaps: prohibit removing readonly bitmaps block/dirty-bitmaps: disallow busy bitmaps as merge source block/dirty-bitmaps: implement inconsistent bit qapi/block-core.json | 20 +++++-- include/block/dirty-bitmap.h | 15 ++++- block/dirty-bitmap.c | 63 +++++++++++++++++--- block/qcow2-bitmap.c | 103 +++++++++++++++++---------------- blockdev.c | 50 ++++------------ migration/block-dirty-bitmap.c | 12 +--- nbd/server.c | 3 +- 7 files changed, 151 insertions(+), 115 deletions(-)