[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 2/5] blockdev: unify qmp_drive_backup and drive-backup tra
From: |
Max Reitz |
Subject: |
Re: [PATCH v4 2/5] blockdev: unify qmp_drive_backup and drive-backup transaction paths |
Date: |
Wed, 27 Nov 2019 17:37:48 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 21.11.19 14:57, Sergio Lopez wrote:
> Issuing a drive-backup from qmp_drive_backup takes a slightly
> different path than when it's issued from a transaction. In the code,
> this is manifested as some redundancy between do_drive_backup() and
> drive_backup_prepare().
>
> This change unifies both paths, merging do_drive_backup() and
> drive_backup_prepare(), and changing qmp_drive_backup() to create a
> transaction instead of calling do_backup_common() direcly.
>
> As a side-effect, now qmp_drive_backup() is executed inside a drained
> section, as it happens when creating a drive-backup transaction. This
> change is visible from the user's perspective, as the job gets paused
> and immediately resumed before starting the actual work.
>
> Signed-off-by: Sergio Lopez <address@hidden>
> ---
> blockdev.c | 224 ++++++++++++++++++++++++-----------------------------
> 1 file changed, 100 insertions(+), 124 deletions(-)
Looks good to me, although it needs to keep the tests passing that now
break.
Max
signature.asc
Description: OpenPGP digital signature
- [PATCH v4 0/5] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup, Sergio Lopez, 2019/11/21
- [PATCH v4 1/5] blockdev: fix coding style issues in drive_backup_prepare, Sergio Lopez, 2019/11/21
- [PATCH v4 2/5] blockdev: unify qmp_drive_backup and drive-backup transaction paths, Sergio Lopez, 2019/11/21
- Re: [PATCH v4 2/5] blockdev: unify qmp_drive_backup and drive-backup transaction paths,
Max Reitz <=
- [PATCH v4 3/5] blockdev: unify qmp_blockdev_backup and blockdev-backup transaction paths, Sergio Lopez, 2019/11/21
- [PATCH v4 4/5] blockdev: honor bdrv_try_set_aio_context() context requirements, Sergio Lopez, 2019/11/21
- [PATCH v4 5/5] iotests: fix 141 after qmp_drive_backup with transactions, Sergio Lopez, 2019/11/21