From: Eric Blake <eblake@redhat.com>
To: John Snow <jsnow@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: Max Reitz <mreitz@redhat.com>, Fam Zheng <fam@euphon.net>,
Kevin Wolf <kwolf@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
vsementsov@virtuozzo.com,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 6/7] block/dirty-bitmaps: disallow busy bitmaps as merge source
Date: Fri, 1 Mar 2019 13:57:47 -0600 [thread overview]
Message-ID: <15751e4f-6415-219f-036b-26a3515a72ce@redhat.com> (raw)
In-Reply-To: <ce11fd2d-0b28-9b67-2382-506f0bfd8754@redhat.com>
On 3/1/19 1:48 PM, John Snow wrote:
>> I understand forbidding inconsistent sources (because if the source is
>> potentially missing bits, then the merge destination will also be
>> missing bits and thus be inconsistent), but why forbid busy? If I've
>> associated a bitmap with an NBD server (making it busy), it is still
>> readable, and so I should still be able to merge its bits into another copy.
>>
>
> True, do you rely on this, though?
Not in my current libvirt code (as I create a temporary bitmap to hand
to NBD, since it may be the merge of one or more disabled bitmaps in a
differential backup case), so being tighter for now and relaxing later
if we DO come up with a use is acceptable.
>
> I was working from a space of "busy" meant "actively in-use by an
> operation, and COULD change" so I was forbidding it out of good hygiene.
>
> Clearly the ones in-use by NBD are actually static and unchanging, so
> it's safer -- but that might not be true for push backups, where you
> might not actually be getting what you think you are, because of the
> bifurcated nature of those bitmaps.
Oh, good point, especially after you worked so hard to merge
locked/frozen into a single status - you WILL miss the bits from the
successor (unless we teach the merge algorithm to pull in the busy
bitmap's bits AND all the bits of its successors - but that feels like a
lot of work if we don't have a client needing it now). Okay, with the
extra justification mentioned in the commit message,
>
> If this causes a problem for you in the short-term I will simply roll
> this back, but it stands out to me.
>
> (I can't stop myself from trying to protect the user from themselves.
> It's clearly a recurring theme in my design and reviews.)
>
>>> diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
>>> index 769668ccdc..8403c9981d 100644
>>> --- a/block/dirty-bitmap.c
>>> +++ b/block/dirty-bitmap.c
>>> @@ -825,6 +825,9 @@ void bdrv_merge_dirty_bitmap(BdrvDirtyBitmap *dest, const BdrvDirtyBitmap *src,
>>> goto out;
>>> }
>>>
>>> + if (bdrv_dirty_bitmap_check(src, BDRV_BITMAP_ALLOW_RO, errp)) {
>>
>> Thus, I think this should be BDRV_BITMAP_INCONSISTENT.
then I retract my complaint, and the code is acceptable for now.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2019-03-01 19:58 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 19:15 [Qemu-devel] [PATCH v3 0/7] bitmaps: add inconsistent bit John Snow
2019-03-01 19:15 ` [Qemu-devel] [PATCH v3 1/7] block/dirty-bitmaps: " John Snow
2019-03-01 19:32 ` Eric Blake
2019-03-01 19:44 ` John Snow
2019-03-06 12:25 ` Vladimir Sementsov-Ogievskiy
2019-03-06 13:06 ` Vladimir Sementsov-Ogievskiy
2019-03-06 13:08 ` Vladimir Sementsov-Ogievskiy
2019-03-06 15:15 ` John Snow
2019-03-01 19:15 ` [Qemu-devel] [PATCH v3 2/7] block/dirty-bitmap: add inconsistent status John Snow
2019-03-06 13:05 ` Vladimir Sementsov-Ogievskiy
2019-03-06 15:14 ` John Snow
2019-03-01 19:15 ` [Qemu-devel] [PATCH v3 3/7] block/dirty-bitmaps: add block_dirty_bitmap_check function John Snow
2019-03-01 19:36 ` Eric Blake
2019-03-01 19:57 ` John Snow
2019-03-01 20:03 ` Eric Blake
2019-03-01 20:06 ` Eric Blake
2019-03-06 13:44 ` Vladimir Sementsov-Ogievskiy
2019-03-06 15:17 ` John Snow
2019-03-01 19:15 ` [Qemu-devel] [PATCH v3 4/7] block/dirty-bitmaps: prohibit readonly bitmaps for backups John Snow
2019-03-01 19:38 ` Eric Blake
2019-03-06 13:47 ` Vladimir Sementsov-Ogievskiy
2019-03-01 19:15 ` [Qemu-devel] [PATCH v3 5/7] block/dirty-bitmaps: prohibit removing readonly bitmaps John Snow
2019-03-01 19:39 ` Eric Blake
2019-03-06 13:49 ` Vladimir Sementsov-Ogievskiy
2019-03-01 19:15 ` [Qemu-devel] [PATCH v3 6/7] block/dirty-bitmaps: disallow busy bitmaps as merge source John Snow
2019-03-01 19:44 ` Eric Blake
2019-03-01 19:48 ` John Snow
2019-03-01 19:57 ` Eric Blake [this message]
2019-03-01 20:04 ` John Snow
2019-03-06 13:57 ` Vladimir Sementsov-Ogievskiy
2019-03-06 15:24 ` John Snow
2019-03-06 15:29 ` Eric Blake
2019-03-06 13:57 ` Vladimir Sementsov-Ogievskiy
2019-03-01 19:15 ` [Qemu-devel] [PATCH v3 7/7] block/dirty-bitmaps: implement inconsistent bit John Snow
2019-03-01 19:53 ` Eric Blake
2019-03-06 14:26 ` Vladimir Sementsov-Ogievskiy
2019-03-06 21:46 ` John Snow
2019-03-07 16:37 ` Eric Blake
2019-03-08 18:46 ` John Snow
2019-03-05 23:59 ` [Qemu-devel] [PATCH v3 0/7] bitmaps: add " John Snow
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=15751e4f-6415-219f-036b-26a3515a72ce@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=fam@euphon.net \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--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).