qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	John Snow <jsnow@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
	"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/5] block/qcow2-bitmap: Allow resizes with persistent bitmaps
Date: Wed, 6 Mar 2019 09:36:09 -0600	[thread overview]
Message-ID: <c86079d4-08f4-afe6-7a8c-63b01868192c@redhat.com> (raw)
In-Reply-To: <6c9c5b9b-8093-e993-1027-db692d20e2e1@virtuozzo.com>

[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]

On 3/6/19 9:33 AM, Vladimir Sementsov-Ogievskiy wrote:

>> +    /* Flush bitmaps */
>> +    if (s->nb_bitmaps) {
>> +        Error *local_err = NULL;
>> +
>> +        /* Usually, bitmaps get resized after this call.
>> +         * Force it earlier so we can make the metadata consistent. */
>> +        bdrv_dirty_bitmap_truncate(bs, offset);
>> +        qcow2_flush_persistent_dirty_bitmaps(bs, &local_err);
>> +        if (local_err) {
>> +            ret = -EINVAL;
>> +            goto fail;
>> +        }
>> +    }
> 
> Why to flush after resize? Bitmaps will be IN_USE in the image anyway...
> 
> Could we implement resize without flush first,  it would be one patch + test? And then consider
> flushing in separate?

What happens with migration if we don't flush the new size to disk, so
the on-disk format has a different size than the in-memory version?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-03-06 15:36 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05 23:43 [Qemu-devel] [PATCH 0/5] block/qcow2-bitmap: Enable resize with persistent bitmaps John Snow
2019-03-05 23:43 ` [Qemu-devel] [PATCH 1/5] block/qcow2-bitmap: Skip length check in some cases John Snow
2019-03-06 12:34   ` Eric Blake
2019-03-06 15:21   ` Vladimir Sementsov-Ogievskiy
2019-03-06 15:35     ` John Snow
2019-03-06 16:07   ` Vladimir Sementsov-Ogievskiy
2019-03-08 22:10     ` John Snow
2019-03-05 23:43 ` [Qemu-devel] [PATCH 2/5] block/qcow2-bitmap: Allow bitmap flushing John Snow
2019-03-06 12:58   ` Eric Blake
2019-03-06 15:59     ` John Snow
2019-03-06 16:12       ` Vladimir Sementsov-Ogievskiy
2019-03-08 22:11         ` John Snow
2019-03-05 23:43 ` [Qemu-devel] [PATCH 3/5] block/qcow2-bitmap: don't remove bitmaps on reopen John Snow
2019-03-06 15:28   ` Vladimir Sementsov-Ogievskiy
2019-03-06 15:38     ` John Snow
2019-03-05 23:43 ` [Qemu-devel] [PATCH 4/5] block/qcow2-bitmap: Allow resizes with persistent bitmaps John Snow
2019-03-06 15:33   ` Vladimir Sementsov-Ogievskiy
2019-03-06 15:36     ` Eric Blake [this message]
2019-03-06 15:44       ` Vladimir Sementsov-Ogievskiy
2019-03-06 15:41     ` John Snow
2019-03-06 15:52       ` Vladimir Sementsov-Ogievskiy
2019-03-06 15:56         ` Vladimir Sementsov-Ogievskiy
2019-03-09  0:35         ` John Snow
2019-03-05 23:43 ` [Qemu-devel] [PATCH 5/5] tests/qemu-iotests: add bitmap resize test 246 John Snow
2019-03-06  0:02 ` [Qemu-devel] [PATCH 0/5] block/qcow2-bitmap: Enable resize with persistent bitmaps John Snow
2019-03-10 16:50 ` no-reply
2019-03-11 16:18 ` Eric Blake
2019-03-11 17:36   ` Vladimir Sementsov-Ogievskiy
2019-03-11 17:48     ` Eric Blake
2019-03-11 18:05       ` Vladimir Sementsov-Ogievskiy
2019-03-11 18:05     ` John Snow
2019-03-11 18:26       ` Vladimir Sementsov-Ogievskiy
2019-03-11 18:35         ` 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=c86079d4-08f4-afe6-7a8c-63b01868192c@redhat.com \
    --to=eblake@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=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).