qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: kwolf@redhat.com, wencongyang2@huawei.com,
	xiechanglong.d@gmail.com, qemu-devel@nongnu.org,
	armbru@redhat.com, den@openvz.org, jsnow@redhat.com
Subject: Re: [PATCH v15 5/5] block/backup: use backup-top instead of write notifiers
Date: Fri, 4 Oct 2019 16:19:36 +0200	[thread overview]
Message-ID: <35155e37-df08-4774-2e9c-7c786b9e52b5@redhat.com> (raw)
In-Reply-To: <20191001131409.14202-6-vsementsov@virtuozzo.com>


[-- Attachment #1.1: Type: text/plain, Size: 3288 bytes --]

On 01.10.19 15:14, Vladimir Sementsov-Ogievskiy wrote:
> Drop write notifiers and use filter node instead.
> 
> = Changes =
> 
> 1. Add filter-node-name argument for backup qmp api. We have to do it
> in this commit, as 257 needs to be fixed.
> 
> 2. There are no more write notifiers here, so is_write_notifier
> parameter is dropped from block-copy paths.
> 
> 3. To sync with in-flight requests at job finish we now have drained
> removing of the filter, we don't need rw-lock.
> 
> 4. Block-copy is now using BdrvChildren instead of BlockBackends
> 
> 5. As backup-top owns these children, we also move block-copy state
> into backup-top's ownership.
> 
> = Iotest changes =
> 
> 56: op-blocker doesn't shoot now, as we set it on source, but then
> check on filter, when trying to start second backup.
> To keep the test we instead can catch another collision: both jobs will
> get 'drive0' job-id, as job-id parameter is unspecified. To prevent
> interleaving with file-posix locks (as they are dependent on config)
> let's use another target for second backup.
> 
> Also, it's obvious now that we'd like to drop this op-blocker at all
> and add a test-case for two backups from one node (to different
> destinations) actually works. But not in these series.
> 
> 141: Output changed: prepatch, "Node is in use" comes from bdrv_has_blk
> check inside qmp_blockdev_del. But we've dropped block-copy blk
> objects, so no more blk objects on source bs (job blk is on backup-top
> filter bs). New message is from op-blocker, which is the next check in
> qmp_blockdev_add.
> 
> 257: The test wants to emulate guest write during backup. They should
> go to filter node, not to original source node, of course. Therefore we
> need to specify filter node name and use it.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>  qapi/block-core.json       |   8 +-
>  include/block/block-copy.h |  14 +-
>  include/block/block_int.h  |   1 +
>  block/backup-top.c         |  21 +--
>  block/backup.c             |  73 +++------
>  block/block-copy.c         |  81 +++-------
>  block/replication.c        |   2 +-
>  blockdev.c                 |   1 +
>  tests/qemu-iotests/056     |   8 +-
>  tests/qemu-iotests/141.out |   2 +-
>  tests/qemu-iotests/257     |   7 +-
>  tests/qemu-iotests/257.out | 306 ++++++++++++++++++-------------------
>  12 files changed, 237 insertions(+), 287 deletions(-)

[...]

> diff --git a/block/block-copy.c b/block/block-copy.c
> index fcb112da14..5404bc921d 100644
> --- a/block/block-copy.c
> +++ b/block/block-copy.c

[...]

> @@ -218,8 +183,8 @@ static int coroutine_fn block_copy_with_offload(BlockCopyState *s,
>      nr_clusters = DIV_ROUND_UP(nbytes, s->cluster_size);
>      bdrv_reset_dirty_bitmap(s->copy_bitmap, start,
>                              s->cluster_size * nr_clusters);
> -    ret = blk_co_copy_range(s->source, start, s->target, start, nbytes,
> -                            read_flags, s->write_flags);
> +    ret = bdrv_co_copy_range(s->source, start, s->target, start, nbytes,
> +                            0, s->write_flags);

The indentation’s off here.  I’ll fix it.

Reviewed-by: Max Reitz <mreitz@redhat.com>


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

  reply	other threads:[~2019-10-04 14:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 13:14 [PATCH v15 0/5] backup-top filter driver for backup Vladimir Sementsov-Ogievskiy
2019-10-01 13:14 ` [PATCH v15 1/5] block/backup: move in-flight requests handling from backup to block-copy Vladimir Sementsov-Ogievskiy
2019-10-02 18:09   ` Max Reitz
2019-10-01 13:14 ` [PATCH v15 2/5] block/backup: move write_flags calculation inside backup_job_create Vladimir Sementsov-Ogievskiy
2019-10-02 18:35   ` Max Reitz
2019-10-01 13:14 ` [PATCH v15 3/5] block/block-copy: split block_copy_set_callbacks function Vladimir Sementsov-Ogievskiy
2019-10-02 18:43   ` Max Reitz
2019-10-01 13:14 ` [PATCH v15 4/5] block: introduce backup-top filter driver Vladimir Sementsov-Ogievskiy
2019-10-04 13:37   ` Max Reitz
2019-10-01 13:14 ` [PATCH v15 5/5] block/backup: use backup-top instead of write notifiers Vladimir Sementsov-Ogievskiy
2019-10-04 14:19   ` Max Reitz [this message]
2019-10-04 14:21 ` [PATCH v15 0/5] backup-top filter driver for backup Max Reitz
2019-10-04 14:36   ` 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=35155e37-df08-4774-2e9c-7c786b9e52b5@redhat.com \
    --to=mreitz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    --cc=wencongyang2@huawei.com \
    --cc=xiechanglong.d@gmail.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).