[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 18/18] iotests: Add test for active mirroring
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [PATCH 18/18] iotests: Add test for active mirroring |
Date: |
Tue, 19 Sep 2017 16:08:58 +0800 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Mon, 09/18 18:53, Max Reitz wrote:
> >> +
> >> + if sync_source_and_target:
> >> + # If source and target should be in sync after the mirror,
> >> + # we have to flush before completion
> >
> > Not sure I understand this requirements, does it apply to libvirt and user
> > too?
> > I.e. it's a part of the interface ? Why cannot mirror_complete do it
> > automatically?
>
> Well, it seems to pass without this flush, but the original intention
> was this: When mirror is completed, the source node is replaced by the
> target. All further writes are then only executed on the (former)
> target node. So what might happen (or at least I think it could) is
> that qemu-io submits some writes, but before they are actually
> performed, the mirror block job is completed and the source is replaced
> by the target. Then, the write operations are performed on the target
> but no longer on the source, so source and target are then out of sync.
> For the mirror block job, that is fine -- at the point of completion,
> source and target were in sync. The job doesn't care that they get out
> of sync after completion. But here, we have to care or we can't compare
> source and target.
>
> The reason for why it always seems to pass without a flush is that every
> submitted write is actually sent to the mirror node before it yields for
> the first time. But I wouldn't bet on that, so I think it's better to
> keep the flush before completing the block job.
OK, that makes sense. Thanks.
Fam
- [Qemu-block] [PATCH 17/18] qemu-io: Add background write, (continued)
- [Qemu-block] [PATCH 17/18] qemu-io: Add background write, Max Reitz, 2017/09/13
- Re: [Qemu-block] [PATCH 17/18] qemu-io: Add background write, Fam Zheng, 2017/09/18
- Re: [Qemu-block] [PATCH 17/18] qemu-io: Add background write, Max Reitz, 2017/09/18
- Re: [Qemu-block] [PATCH 17/18] qemu-io: Add background write, Fam Zheng, 2017/09/19
- Re: [Qemu-block] [PATCH 17/18] qemu-io: Add background write, Max Reitz, 2017/09/21
- Re: [Qemu-block] [PATCH 17/18] qemu-io: Add background write, Fam Zheng, 2017/09/21
- Re: [Qemu-block] [PATCH 17/18] qemu-io: Add background write, Max Reitz, 2017/09/21
[Qemu-block] [PATCH 18/18] iotests: Add test for active mirroring, Max Reitz, 2017/09/13
Re: [Qemu-block] [PATCH 00/18] block/mirror: Add active-sync mirroring, Stefan Hajnoczi, 2017/09/14