* [pve-devel] [PATCH qemu] QMP backup: use correct errno when getting blockdrive length fails
@ 2023-01-30 10:20 Fiona Ebner
2023-02-21 8:19 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2023-01-30 10:20 UTC (permalink / raw)
To: pve-devel
di->size would only be set later. The errno is minus the return value
from the function.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
.../0029-PVE-Backup-proxmox-backup-patches-for-qemu.patch | 4 ++--
...043-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/debian/patches/pve/0029-PVE-Backup-proxmox-backup-patches-for-qemu.patch b/debian/patches/pve/0029-PVE-Backup-proxmox-backup-patches-for-qemu.patch
index 40a56be..36ca351 100644
--- a/debian/patches/pve/0029-PVE-Backup-proxmox-backup-patches-for-qemu.patch
+++ b/debian/patches/pve/0029-PVE-Backup-proxmox-backup-patches-for-qemu.patch
@@ -501,7 +501,7 @@ index 0000000000..1dda8b7d8f
+#endif /* PROXMOX_BACKUP_CLIENT_H */
diff --git a/pve-backup.c b/pve-backup.c
new file mode 100644
-index 0000000000..3d28975eaa
+index 0000000000..6af212b9b4
--- /dev/null
+++ b/pve-backup.c
@@ -0,0 +1,956 @@
@@ -1134,7 +1134,7 @@ index 0000000000..3d28975eaa
+
+ ssize_t size = bdrv_getlength(di->bs);
+ if (size < 0) {
-+ error_setg_errno(task->errp, -di->size, "bdrv_getlength failed");
++ error_setg_errno(task->errp, -size, "bdrv_getlength failed");
+ goto err;
+ }
+ di->size = size;
diff --git a/debian/patches/pve/0043-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch b/debian/patches/pve/0043-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch
index 58a3556..18675b2 100644
--- a/debian/patches/pve/0043-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch
+++ b/debian/patches/pve/0043-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch
@@ -116,7 +116,7 @@ index 4ce7bc0b5e..0923037dec 100644
static void proxmox_backup_schedule_wake(void *data) {
CoCtxData *waker = (CoCtxData *)data;
diff --git a/pve-backup.c b/pve-backup.c
-index fa9c6c4493..109498eaf9 100644
+index 5662f48b72..e4fe1b601d 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -354,7 +354,7 @@ static void job_cancel_bh(void *opaque) {
@@ -267,8 +267,8 @@ index fa9c6c4493..109498eaf9 100644
ssize_t size = bdrv_getlength(di->bs);
if (size < 0) {
-- error_setg_errno(task->errp, -di->size, "bdrv_getlength failed");
-+ error_setg_errno(errp, -di->size, "bdrv_getlength failed");
+- error_setg_errno(task->errp, -size, "bdrv_getlength failed");
++ error_setg_errno(errp, -size, "bdrv_getlength failed");
goto err;
}
di->size = size;
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-21 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30 10:20 [pve-devel] [PATCH qemu] QMP backup: use correct errno when getting blockdrive length fails Fiona Ebner
2023-02-21 8:19 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox