All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com,
	armbru@redhat.com, eblake@redhat.com, jsnow@redhat.com,
	famz@redhat.com, den@openvz.org, stefanha@redhat.com,
	pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 16/29] block: add bdrv_load_dirty_bitmap()
Date: Thu, 11 Aug 2016 13:24:46 +0200	[thread overview]
Message-ID: <20160811112446.GC5035@noname.redhat.com> (raw)
In-Reply-To: <1470668720-211300-17-git-send-email-vsementsov@virtuozzo.com>

Am 08.08.2016 um 17:05 hat Vladimir Sementsov-Ogievskiy geschrieben:
> The funcion loads dirty bitmap from file, using underlying driver
> function.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>  block/dirty-bitmap.c         | 16 ++++++++++++++++
>  include/block/dirty-bitmap.h |  2 ++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
> index 6df7fe1..1d0ea25 100644
> --- a/block/dirty-bitmap.c
> +++ b/block/dirty-bitmap.c
> @@ -597,3 +597,19 @@ void bdrv_finalize_persistent_dirty_bitmaps(BlockDriverState *bs)
>          }
>      }
>  }
> +
> +BdrvDirtyBitmap *bdrv_load_dirty_bitmap(BlockDriverState *bs, const char *name,
> +                                        Error **errp)
> +{
> +    BlockDriver *drv = bs->drv;
> +    if (!drv) {
> +        return NULL;
> +    }
> +    if (drv->bdrv_dirty_bitmap_load) {
> +        return drv->bdrv_dirty_bitmap_load(bs, name, errp);

Why the inconsistency between load_dirty and dirty_load? The bdrv_*
wrappers usually have exactly the same name as the BlockDriver fields.

> +    }
> +    if (bs->file)  {
> +        return bdrv_load_dirty_bitmap(bs, name, errp);
> +    }
> +    return NULL;
> +}

Let me ask a general question about this series: What is the expected
state after it is applied?

I'm asking because even after the full series is applied, I don't see a
single user of bdrv_load_dirty_bitmap(), bdrv_load_check_dirty_bitmap()
or bdrv_store_dirty_bitmap(). Is all of this dead code?

Kevin

  reply	other threads:[~2016-08-11 11:24 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 15:04 [Qemu-devel] [PATCH v6 00/29] qcow2: persistent dirty bitmaps Vladimir Sementsov-Ogievskiy
2016-08-08 15:04 ` [Qemu-devel] [PATCH 01/29] hbitmap: fix dirty iter Vladimir Sementsov-Ogievskiy
2016-08-10 13:41   ` Kevin Wolf
2016-08-10 13:59     ` Vladimir Sementsov-Ogievskiy
2016-08-08 15:04 ` [Qemu-devel] [PATCH 02/29] tests: add hbitmap iter test Vladimir Sementsov-Ogievskiy
2016-08-08 15:04 ` [Qemu-devel] [PATCH 03/29] block: fix bdrv_dirty_bitmap_granularity signature Vladimir Sementsov-Ogievskiy
2016-08-10 13:42   ` Kevin Wolf
2016-08-08 15:04 ` [Qemu-devel] [PATCH 04/29] block/dirty-bitmap: add deserialize_ones func Vladimir Sementsov-Ogievskiy
2016-08-10 13:49   ` Kevin Wolf
2016-08-08 15:04 ` [Qemu-devel] [PATCH 05/29] qcow2-bitmap: structs and consts Vladimir Sementsov-Ogievskiy
2016-08-11  9:09   ` Kevin Wolf
2016-08-08 15:04 ` [Qemu-devel] [PATCH 06/29] qcow2-bitmap: add qcow2_read_bitmaps() Vladimir Sementsov-Ogievskiy
2016-08-11  9:36   ` Kevin Wolf
2016-08-11 12:00     ` Vladimir Sementsov-Ogievskiy
2016-08-11 12:54       ` Kevin Wolf
2016-08-08 15:04 ` [Qemu-devel] [PATCH 07/29] qcow2-bitmap: add qcow2_bitmap_load() Vladimir Sementsov-Ogievskiy
2016-08-11 13:00   ` Kevin Wolf
2016-08-08 15:04 ` [Qemu-devel] [PATCH 08/29] qcow2-bitmap: delete bitmap from qcow2 after load Vladimir Sementsov-Ogievskiy
2016-08-11 13:18   ` Kevin Wolf
2016-08-30 15:03     ` Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 09/29] qcow2-bitmap: add qcow2_bitmap_store() Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 10/29] qcow2-bitmap: add IN_USE flag Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 11/29] qcow2-bitmap: check constraints Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 12/29] qcow2: add qcow2_delete_bitmaps Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 13/29] qcow2: add dirty bitmaps extension Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 14/29] qcow2-bitmap: add qcow2_bitmap_load_check() Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 15/29] block/dirty-bitmap: introduce persistent bitmaps Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 16/29] block: add bdrv_load_dirty_bitmap() Vladimir Sementsov-Ogievskiy
2016-08-11 11:24   ` Kevin Wolf [this message]
2016-08-11 11:29     ` Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 17/29] qcow2-bitmap: add autoclear bit Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 18/29] qcow2-bitmap: disallow storing bitmap to other bs Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 19/29] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 20/29] qcow2-bitmap: add AUTO flag Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 21/29] qcow2-bitmap: add EXTRA_DATA_COMPATIBLE flag Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 22/29] qmp: add persistent flag to block-dirty-bitmap-add Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 23/29] qmp: add autoload parameter " Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 24/29] qcow2-bitmap: maintian BlockDirtyBitmap.autoload Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 25/29] qapi: add md5 checksum of last dirty bitmap level to query-block Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 26/29] iotests: test qcow2 persistent dirty bitmap Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 27/29] qcow2-bitmap: delete in_use bitmaps on image load Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 28/29] qcow2-bitmap: do not try reloading bitmaps Vladimir Sementsov-Ogievskiy
2016-08-08 15:05 ` [Qemu-devel] [PATCH 29/29] qcow2-dirty-bitmap: refcounts Vladimir Sementsov-Ogievskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160811112446.GC5035@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.