mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-25 11:01:52 -06:00
Revert "mirror: Only mirror granularity-aligned chunks"
This reverts commit 9adc1cb49a
.
"mirror: Only mirror granularity-aligned chunks"
Since previous commit unaligned chunks are supported by
do_sync_target_write.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20191011090711.19940-6-vsementsov@virtuozzo.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
dbdf699cad
commit
994b44ab20
1 changed files with 0 additions and 29 deletions
|
@ -1488,15 +1488,6 @@ static void bdrv_mirror_top_child_perm(BlockDriverState *bs, BdrvChild *c,
|
||||||
*nshared = BLK_PERM_ALL;
|
*nshared = BLK_PERM_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bdrv_mirror_top_refresh_limits(BlockDriverState *bs, Error **errp)
|
|
||||||
{
|
|
||||||
MirrorBDSOpaque *s = bs->opaque;
|
|
||||||
|
|
||||||
if (s && s->job && s->job->copy_mode == MIRROR_COPY_MODE_WRITE_BLOCKING) {
|
|
||||||
bs->bl.request_alignment = s->job->granularity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dummy node that provides consistent read to its users without requiring it
|
/* Dummy node that provides consistent read to its users without requiring it
|
||||||
* from its backing file and that allows writes on the backing file chain. */
|
* from its backing file and that allows writes on the backing file chain. */
|
||||||
static BlockDriver bdrv_mirror_top = {
|
static BlockDriver bdrv_mirror_top = {
|
||||||
|
@ -1509,7 +1500,6 @@ static BlockDriver bdrv_mirror_top = {
|
||||||
.bdrv_co_block_status = bdrv_co_block_status_from_backing,
|
.bdrv_co_block_status = bdrv_co_block_status_from_backing,
|
||||||
.bdrv_refresh_filename = bdrv_mirror_top_refresh_filename,
|
.bdrv_refresh_filename = bdrv_mirror_top_refresh_filename,
|
||||||
.bdrv_child_perm = bdrv_mirror_top_child_perm,
|
.bdrv_child_perm = bdrv_mirror_top_child_perm,
|
||||||
.bdrv_refresh_limits = bdrv_mirror_top_refresh_limits,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static BlockJob *mirror_start_job(
|
static BlockJob *mirror_start_job(
|
||||||
|
@ -1657,25 +1647,6 @@ static BlockJob *mirror_start_job(
|
||||||
s->should_complete = true;
|
s->should_complete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Must be called before we start tracking writes, but after
|
|
||||||
*
|
|
||||||
* ((MirrorBlockJob *)
|
|
||||||
* ((MirrorBDSOpaque *)
|
|
||||||
* mirror_top_bs->opaque
|
|
||||||
* )->job
|
|
||||||
* )->copy_mode
|
|
||||||
*
|
|
||||||
* has the correct value.
|
|
||||||
* (We start tracking writes as of the following
|
|
||||||
* bdrv_create_dirty_bitmap() call.)
|
|
||||||
*/
|
|
||||||
bdrv_refresh_limits(mirror_top_bs, &local_err);
|
|
||||||
if (local_err) {
|
|
||||||
error_propagate(errp, local_err);
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
s->dirty_bitmap = bdrv_create_dirty_bitmap(bs, granularity, NULL, errp);
|
s->dirty_bitmap = bdrv_create_dirty_bitmap(bs, granularity, NULL, errp);
|
||||||
if (!s->dirty_bitmap) {
|
if (!s->dirty_bitmap) {
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue