From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com, jcody@redhat.com,
mreitz@redhat.com, stefanha@redhat.com, den@openvz.org,
jsnow@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/5] hbitmap: add next_zero function
Date: Mon, 2 Oct 2017 10:43:04 -0500 [thread overview]
Message-ID: <7afabb38-abb6-a261-20a0-48aa6526c315@redhat.com> (raw)
In-Reply-To: <20171002143919.207741-2-vsementsov@virtuozzo.com>
[-- Attachment #1: Type: text/plain, Size: 1476 bytes --]
On 10/02/2017 09:39 AM, Vladimir Sementsov-Ogievskiy wrote:
> The function searches for next zero bit.
> Also add interface for BdrvDirtyBitmap.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> include/block/dirty-bitmap.h | 1 +
> include/qemu/hbitmap.h | 8 ++++++++
> block/dirty-bitmap.c | 5 +++++
> util/hbitmap.c | 29 +++++++++++++++++++++++++++++
> 4 files changed, 43 insertions(+)
>
> +++ b/block/dirty-bitmap.c
> @@ -715,3 +715,8 @@ char *bdrv_dirty_bitmap_sha256(const BdrvDirtyBitmap *bitmap, Error **errp)
> {
> return hbitmap_sha256(bitmap->bitmap, errp);
> }
> +
> +int64_t bdrv_dirty_bitmap_next_zero(BdrvDirtyBitmap *bitmap, uint64_t offset)
> +{
> + return hbitmap_next_zero(bitmap->bitmap, offset);
> +}
Returns an answer in the same scale as the underlying hbitmap; if this
is applied before my byte-based dirty bitmap series, that means offset
is a sector count and the result is likewise a sector number (awkward);
if this is applied after my series, you pass in a byte offset start and
get a byte result (nice).
I don't see any obvious errors in the implementation, but DO think that
you should include a testsuite enhancement in tests/test-hbitmap.c to
cover the new functionality before we accept this.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
next prev parent reply other threads:[~2017-10-02 15:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 14:39 [Qemu-devel] [PATCH 0/5] backup improvements part 1 Vladimir Sementsov-Ogievskiy
2017-10-02 14:39 ` [Qemu-devel] [PATCH 1/5] hbitmap: add next_zero function Vladimir Sementsov-Ogievskiy
2017-10-02 15:43 ` Eric Blake [this message]
2017-10-02 16:16 ` Vladimir Sementsov-Ogievskiy
2017-10-09 21:51 ` John Snow
2017-10-12 10:05 ` Vladimir Sementsov-Ogievskiy
2017-10-02 14:39 ` [Qemu-devel] [PATCH 2/5] backup: move from done_bitmap to copy_bitmap Vladimir Sementsov-Ogievskiy
2017-10-09 22:16 ` John Snow
2017-10-02 14:39 ` [Qemu-devel] [PATCH 3/5] backup: init copy_bitmap from sync_bitmap for incremental Vladimir Sementsov-Ogievskiy
2017-10-09 22:56 ` John Snow
2017-10-12 11:23 ` Vladimir Sementsov-Ogievskiy
2017-11-07 0:25 ` John Snow
2017-10-02 14:39 ` [Qemu-devel] [PATCH 4/5] backup: simplify non-dirty bits progress processing Vladimir Sementsov-Ogievskiy
2017-10-09 23:44 ` John Snow
2017-10-12 11:42 ` Vladimir Sementsov-Ogievskiy
2017-10-12 13:56 ` Eric Blake
2017-10-02 14:39 ` [Qemu-devel] [PATCH 5/5] backup: use copy_bitmap in incremental backup Vladimir Sementsov-Ogievskiy
2017-10-09 23:51 ` John Snow
2017-10-02 15:38 ` [Qemu-devel] [PATCH 0/5] backup improvements part 1 Eric Blake
2017-10-02 16:17 ` Vladimir Sementsov-Ogievskiy
-- strict thread matches above, loose matches on Subject: below --
2017-10-12 13:53 [Qemu-devel] [PATCH v2 " Vladimir Sementsov-Ogievskiy
2017-10-12 13:53 ` [Qemu-devel] [PATCH 1/5] hbitmap: add next_zero function 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=7afabb38-abb6-a261-20a0-48aa6526c315@redhat.com \
--to=eblake@redhat.com \
--cc=den@openvz.org \
--cc=famz@redhat.com \
--cc=jcody@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).