all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu 1/2] patch cleanup: squash backup dump driver change into patch introducing the driver
Date: Tue,  9 Jan 2024 15:09:59 +0100	[thread overview]
Message-ID: <20240109141000.147267-1-f.ebner@proxmox.com> (raw)

Makes it simpler and shorter. Still results in the same code after
applying both patches in question.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 ...-Backup-add-backup-dump-block-driver.patch | 22 ++---
 ...ckup-Proxmox-backup-patches-for-QEMU.patch | 81 ++++---------------
 2 files changed, 28 insertions(+), 75 deletions(-)

diff --git a/debian/patches/pve/0028-PVE-Backup-add-backup-dump-block-driver.patch b/debian/patches/pve/0028-PVE-Backup-add-backup-dump-block-driver.patch
index 0d7fd96..1adb45d 100644
--- a/debian/patches/pve/0028-PVE-Backup-add-backup-dump-block-driver.patch
+++ b/debian/patches/pve/0028-PVE-Backup-add-backup-dump-block-driver.patch
@@ -12,20 +12,20 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
 [FE: adapt to coroutine changes]
 Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
 ---
- block/backup-dump.c              | 168 +++++++++++++++++++++++++++++++
+ block/backup-dump.c              | 172 +++++++++++++++++++++++++++++++
  block/backup.c                   |  30 ++----
  block/meson.build                |   1 +
  include/block/block_int-common.h |  35 +++++++
  job.c                            |   3 +-
- 5 files changed, 214 insertions(+), 23 deletions(-)
+ 5 files changed, 218 insertions(+), 23 deletions(-)
  create mode 100644 block/backup-dump.c
 
 diff --git a/block/backup-dump.c b/block/backup-dump.c
 new file mode 100644
-index 0000000000..232a094426
+index 0000000000..e46abf1070
 --- /dev/null
 +++ b/block/backup-dump.c
-@@ -0,0 +1,168 @@
+@@ -0,0 +1,172 @@
 +/*
 + * BlockDriver to send backup data stream to a callback function
 + *
@@ -37,6 +37,8 @@ index 0000000000..232a094426
 + */
 +
 +#include "qemu/osdep.h"
++
++#include "qapi/qmp/qdict.h"
 +#include "qom/object_interfaces.h"
 +#include "block/block_int.h"
 +
@@ -169,7 +171,7 @@ index 0000000000..232a094426
 +block_init(bdrv_backup_dump_init);
 +
 +
-+BlockDriverState *bdrv_backup_dump_create(
++BlockDriverState *coroutine_fn bdrv_co_backup_dump_create(
 +    int dump_cb_block_size,
 +    uint64_t byte_size,
 +    BackupDumpFunc *dump_cb,
@@ -177,9 +179,11 @@ index 0000000000..232a094426
 +    Error **errp)
 +{
 +    BDRVBackupDumpState *state;
-+    BlockDriverState *bs = bdrv_new_open_driver(
-+        &bdrv_backup_dump_drive, NULL, BDRV_O_RDWR, errp);
 +
++    QDict *options = qdict_new();
++    qdict_put_str(options, "driver", "backup-dump-drive");
++
++    BlockDriverState *bs = bdrv_co_open(NULL, NULL, options, BDRV_O_RDWR, errp);
 +    if (!bs) {
 +        return NULL;
 +    }
@@ -255,7 +259,7 @@ index 59b71ba9f3..6fde9f7dcd 100644
    'blkdebug.c',
    'blklogwrites.c',
 diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
-index 74195c3004..0f2e1817ad 100644
+index 74195c3004..0a0339eee4 100644
 --- a/include/block/block_int-common.h
 +++ b/include/block/block_int-common.h
 @@ -26,6 +26,7 @@
@@ -272,7 +276,7 @@ index 74195c3004..0f2e1817ad 100644
  
 +typedef int BackupDumpFunc(void *opaque, uint64_t offset, uint64_t bytes, const void *buf);
 +
-+BlockDriverState *bdrv_backup_dump_create(
++BlockDriverState *coroutine_fn bdrv_co_backup_dump_create(
 +    int dump_cb_block_size,
 +    uint64_t byte_size,
 +    BackupDumpFunc *dump_cb,
diff --git a/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch b/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch
index 3829068..bd1633b 100644
--- a/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch
+++ b/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch
@@ -84,63 +84,25 @@ Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
      create jobs in a drained section]
 Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
 ---
- block/backup-dump.c              |   10 +-
- block/meson.build                |    5 +
- block/monitor/block-hmp-cmds.c   |   39 ++
- blockdev.c                       |    1 +
- hmp-commands-info.hx             |   14 +
- hmp-commands.hx                  |   29 +
- include/block/block_int-common.h |    2 +-
- include/monitor/hmp.h            |    3 +
- meson.build                      |    1 +
- monitor/hmp-cmds.c               |   72 ++
- proxmox-backup-client.c          |  146 ++++
- proxmox-backup-client.h          |   60 ++
- pve-backup.c                     | 1067 ++++++++++++++++++++++++++++++
- qapi/block-core.json             |  229 +++++++
- qapi/common.json                 |   14 +
- qapi/machine.json                |   16 +-
- 16 files changed, 1690 insertions(+), 18 deletions(-)
+ block/meson.build              |    5 +
+ block/monitor/block-hmp-cmds.c |   39 ++
+ blockdev.c                     |    1 +
+ hmp-commands-info.hx           |   14 +
+ hmp-commands.hx                |   29 +
+ include/monitor/hmp.h          |    3 +
+ meson.build                    |    1 +
+ monitor/hmp-cmds.c             |   72 +++
+ proxmox-backup-client.c        |  146 +++++
+ proxmox-backup-client.h        |   60 ++
+ pve-backup.c                   | 1067 ++++++++++++++++++++++++++++++++
+ qapi/block-core.json           |  229 +++++++
+ qapi/common.json               |   14 +
+ qapi/machine.json              |   16 +-
+ 14 files changed, 1682 insertions(+), 14 deletions(-)
  create mode 100644 proxmox-backup-client.c
  create mode 100644 proxmox-backup-client.h
  create mode 100644 pve-backup.c
 
-diff --git a/block/backup-dump.c b/block/backup-dump.c
-index 232a094426..e46abf1070 100644
---- a/block/backup-dump.c
-+++ b/block/backup-dump.c
-@@ -9,6 +9,8 @@
-  */
- 
- #include "qemu/osdep.h"
-+
-+#include "qapi/qmp/qdict.h"
- #include "qom/object_interfaces.h"
- #include "block/block_int.h"
- 
-@@ -141,7 +143,7 @@ static void bdrv_backup_dump_init(void)
- block_init(bdrv_backup_dump_init);
- 
- 
--BlockDriverState *bdrv_backup_dump_create(
-+BlockDriverState *coroutine_fn bdrv_co_backup_dump_create(
-     int dump_cb_block_size,
-     uint64_t byte_size,
-     BackupDumpFunc *dump_cb,
-@@ -149,9 +151,11 @@ BlockDriverState *bdrv_backup_dump_create(
-     Error **errp)
- {
-     BDRVBackupDumpState *state;
--    BlockDriverState *bs = bdrv_new_open_driver(
--        &bdrv_backup_dump_drive, NULL, BDRV_O_RDWR, errp);
- 
-+    QDict *options = qdict_new();
-+    qdict_put_str(options, "driver", "backup-dump-drive");
-+
-+    BlockDriverState *bs = bdrv_co_open(NULL, NULL, options, BDRV_O_RDWR, errp);
-     if (!bs) {
-         return NULL;
-     }
 diff --git a/block/meson.build b/block/meson.build
 index 6fde9f7dcd..6d468f89e5 100644
 --- a/block/meson.build
@@ -281,19 +243,6 @@ index e352f86872..0c8b6725fb 100644
  ERST
  
      {
-diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
-index 0f2e1817ad..0a0339eee4 100644
---- a/include/block/block_int-common.h
-+++ b/include/block/block_int-common.h
-@@ -63,7 +63,7 @@
- 
- typedef int BackupDumpFunc(void *opaque, uint64_t offset, uint64_t bytes, const void *buf);
- 
--BlockDriverState *bdrv_backup_dump_create(
-+BlockDriverState *coroutine_fn bdrv_co_backup_dump_create(
-     int dump_cb_block_size,
-     uint64_t byte_size,
-     BackupDumpFunc *dump_cb,
 diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h
 index 7a7def7530..cba7afe70c 100644
 --- a/include/monitor/hmp.h
-- 
2.39.2





             reply	other threads:[~2024-01-09 14:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 14:09 Fiona Ebner [this message]
2024-01-09 14:10 ` [pve-devel] [PATCH qemu 2/2] backup: avoid bubbling up first ECANCELED error Fiona Ebner
2024-03-12 12:22 ` [pve-devel] applied-series: [PATCH qemu 1/2] patch cleanup: squash backup dump driver change into patch introducing the driver Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240109141000.147267-1-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal