[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 7/8] blockdev: change qmp_blockdev_backup to make use of trans
From: |
Sergio Lopez |
Subject: |
[PATCH v3 7/8] blockdev: change qmp_blockdev_backup to make use of transactions |
Date: |
Tue, 12 Nov 2019 12:30:11 +0100 |
Change qmp_blockdev_backup() to create and start a transaction instead
of calling do_blockdev_backup() directly.
Signed-off-by: Sergio Lopez <address@hidden>
---
blockdev.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index f94aaa98f0..152a0f7454 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3689,13 +3689,13 @@ XDbgBlockGraph *qmp_x_debug_query_block_graph(Error
**errp)
return bdrv_get_xdbg_block_graph(errp);
}
-void qmp_blockdev_backup(BlockdevBackup *arg, Error **errp)
+void qmp_blockdev_backup(BlockdevBackup *backup, Error **errp)
{
- BlockJob *job;
- job = do_blockdev_backup(arg, NULL, errp);
- if (job) {
- job_start(&job->job);
- }
+ TransactionAction action = {
+ .type = TRANSACTION_ACTION_KIND_BLOCKDEV_BACKUP,
+ .u.blockdev_backup.data = backup,
+ };
+ blockdev_do_action(&action, errp);
}
/* Parameter check and block job starting for drive mirroring.
--
2.23.0
- [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup, Sergio Lopez, 2019/11/12
- [PATCH v3 1/8] blockdev: merge drive_backup_prepare with do_drive_backup, Sergio Lopez, 2019/11/12
- [PATCH v3 4/8] blockdev: change qmp_drive_backup to make use of transactions, Sergio Lopez, 2019/11/12
- [PATCH v3 2/8] blockdev: fix coding style issues in drive_backup_prepare, Sergio Lopez, 2019/11/12
- [PATCH v3 8/8] blockdev: honor bdrv_try_set_aio_context() context requirements, Sergio Lopez, 2019/11/12
- [PATCH v3 6/8] blockdev: place blockdev_backup_prepare with the other related transaction helpers, Sergio Lopez, 2019/11/12
- [PATCH v3 3/8] blockdev: place drive_backup_prepare with the other related transaction functions, Sergio Lopez, 2019/11/12
- [PATCH v3 7/8] blockdev: change qmp_blockdev_backup to make use of transactions,
Sergio Lopez <=
- [PATCH v3 5/8] blockdev: merge blockdev_backup_prepare with do_blockdev_backup, Sergio Lopez, 2019/11/12
- Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup, no-reply, 2019/11/12
- Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup, Sergio Lopez, 2019/11/13
- Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup, Sergio Lopez, 2019/11/13
- Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup, Max Reitz, 2019/11/19
- Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup, Sergio Lopez, 2019/11/19
- Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup, Kevin Wolf, 2019/11/19
- Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup, Sergio Lopez, 2019/11/19
- Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup, Kevin Wolf, 2019/11/19
- Re: [PATCH v3 0/8] blockdev: avoid acquiring AioContext lock twice at do_drive_backup and do_blockdev_backup, Sergio Lopez, 2019/11/19