From nobody Sun Feb 8 17:36:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1570829169; cv=none; d=zoho.com; s=zohoarc; b=UJ99RqcmHjSiRQPomVXIfkVZbr5YVOlRMtDq0H2W37irLPbDAHMddC9Nry8pXo+REdrxObuRonaVwd9gWwa+JN10La8kdIAS5TPKvPsZGwpML6/urH2a2FJJLlH9ImjlJkZKEDD4CosjC8CC8ClZgUBQ0np0detiK/Nn+uwp7NY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570829169; h=Content-Type: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; bh=QqEjT2eiOMNoTPSWe2PDXbHcwmR6+ebQzWrImIhjiZk=; b=XEtI0s8VxjqfBHznWa/UmqK8MCu9voAMlv/Hkh5D0pSV1YvP85feex3R9OnCUqDXy5GlR6+TXt4Mdk+iZc7TmNJy/ekaGyOOoyx/5ZhjQS3kbZvpwhtw9hjTwhdj17wk0oIb00nTQejnbjlBAHEcmsNjMs099+GzqGS6vpNpWPA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1570829169078423.7150092128827; Fri, 11 Oct 2019 14:26:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 27E2B5AFDE; Fri, 11 Oct 2019 21:26:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E2BE601A3; Fri, 11 Oct 2019 21:26:06 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 62634180B536; Fri, 11 Oct 2019 21:26:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9BLQ3Q8006457 for ; Fri, 11 Oct 2019 17:26:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id 36AAB45A3; Fri, 11 Oct 2019 21:26:03 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-173.bos.redhat.com [10.18.17.173]) by smtp.corp.redhat.com (Postfix) with ESMTP id D45294530; Fri, 11 Oct 2019 21:26:01 +0000 (UTC) From: John Snow To: Peter Maydell , qemu-devel@nongnu.org Date: Fri, 11 Oct 2019 17:25:33 -0400 Message-Id: <20191011212550.27269-3-jsnow@redhat.com> In-Reply-To: <20191011212550.27269-1-jsnow@redhat.com> References: <20191011212550.27269-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Fam Zheng , Kevin Wolf , Vladimir Sementsov-Ogievskiy , qemu-block@nongnu.org, Juan Quintela , libvir-list@redhat.com, John Snow , "Dr. David Alan Gilbert" , Max Reitz , Stefan Hajnoczi Subject: [libvirt] [PULL 02/19] block: move bdrv_can_store_new_dirty_bitmap to block/dirty-bitmap.c X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 11 Oct 2019 21:26:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" From: Vladimir Sementsov-Ogievskiy block/dirty-bitmap.c seems to be more appropriate for it and bdrv_remove_persistent_dirty_bitmap already in it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20190920082543.23444-2-vsementsov@virtuozzo.com Signed-off-by: John Snow --- block.c | 22 ---------------------- block/dirty-bitmap.c | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/block.c b/block.c index 59441248451..bea03cfcc92 100644 --- a/block.c +++ b/block.c @@ -6555,25 +6555,3 @@ void bdrv_del_child(BlockDriverState *parent_bs, Bdr= vChild *child, Error **errp) =20 parent_bs->drv->bdrv_del_child(parent_bs, child, errp); } - -bool bdrv_can_store_new_dirty_bitmap(BlockDriverState *bs, const char *nam= e, - uint32_t granularity, Error **errp) -{ - BlockDriver *drv =3D bs->drv; - - if (!drv) { - error_setg_errno(errp, ENOMEDIUM, - "Can't store persistent bitmaps to %s", - bdrv_get_device_or_node_name(bs)); - return false; - } - - if (!drv->bdrv_can_store_new_dirty_bitmap) { - error_setg_errno(errp, ENOTSUP, - "Can't store persistent bitmaps to %s", - bdrv_get_device_or_node_name(bs)); - return false; - } - - return drv->bdrv_can_store_new_dirty_bitmap(bs, name, granularity, err= p); -} diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 134e0c9a0c8..8f42015db95 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -464,6 +464,28 @@ void bdrv_remove_persistent_dirty_bitmap(BlockDriverSt= ate *bs, } } =20 +bool bdrv_can_store_new_dirty_bitmap(BlockDriverState *bs, const char *nam= e, + uint32_t granularity, Error **errp) +{ + BlockDriver *drv =3D bs->drv; + + if (!drv) { + error_setg_errno(errp, ENOMEDIUM, + "Can't store persistent bitmaps to %s", + bdrv_get_device_or_node_name(bs)); + return false; + } + + if (!drv->bdrv_can_store_new_dirty_bitmap) { + error_setg_errno(errp, ENOTSUP, + "Can't store persistent bitmaps to %s", + bdrv_get_device_or_node_name(bs)); + return false; + } + + return drv->bdrv_can_store_new_dirty_bitmap(bs, name, granularity, err= p); +} + void bdrv_disable_dirty_bitmap(BdrvDirtyBitmap *bitmap) { bdrv_dirty_bitmap_lock(bitmap); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list