[PATCH v6 0/4] replication: Bugfix and properly attach children

Lukas Straub posted 4 patches 2 years, 9 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1626619393.git.lukasstraub2@web.de
Maintainers: Kevin Wolf <kwolf@redhat.com>, Wen Congyang <wencongyang2@huawei.com>, Max Reitz <mreitz@redhat.com>, Xie Changlong <xiechanglong.d@gmail.com>
block/replication.c | 111 +++++++++++++++++++++++++++-----------------
1 file changed, 68 insertions(+), 43 deletions(-)
[PATCH v6 0/4] replication: Bugfix and properly attach children
Posted by Lukas Straub 2 years, 9 months ago
Hello Everyone,
A while ago Kevin noticed that the replication driver doesn't properly attach
the children it wants to use. Instead, it directly copies the BdrvChilds from
it's backing file, which is wrong. Ths Patchset fixes the problem, fixes a
potential crash in replication_co_writev due to missing permissions and removes
a workaround that was put in place back then.

Tested with full COLO-migration setup in my COLO testsuite.

Regards,
Lukas Straub

Changes:

-v6:
    -Drop "replication: Assert that children are writable"
    -Added Reviewed-by tags

-v5:
    -Assert that children are writable where it's needed

-v4:
    -minor style fixes
    -clarify why children areguaranteed to be writable in
     "replication: Remove workaround"
    -Added Reviewed-by tags

-v3:
    -Split up into multiple patches
    -Remove s->active_disk
    -Clarify child permissions in commit message

-v2: Test for BDRV_CHILD_PRIMARY in replication_child_perm, since
     bs->file might not be set yet. (Vladimir)

Lukas Straub (4):
  replication: Remove s->active_disk
  replication: Reduce usage of s->hidden_disk and s->secondary_disk
  replication: Properly attach children
  replication: Remove workaround

 block/replication.c | 111 +++++++++++++++++++++++++++-----------------
 1 file changed, 68 insertions(+), 43 deletions(-)

--
2.20.1
Re: [PATCH v6 0/4] replication: Bugfix and properly attach children
Posted by Kevin Wolf 2 years, 9 months ago
Am 18.07.2021 um 16:48 hat Lukas Straub geschrieben:
> Hello Everyone,
> A while ago Kevin noticed that the replication driver doesn't properly attach
> the children it wants to use. Instead, it directly copies the BdrvChilds from
> it's backing file, which is wrong. Ths Patchset fixes the problem, fixes a
> potential crash in replication_co_writev due to missing permissions and removes
> a workaround that was put in place back then.
> 
> Tested with full COLO-migration setup in my COLO testsuite.

Thanks for taking care of this, Lukas!

I've applied the series to the block branch.

Kevin