[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 04/10] migration: Deliver return path file error to migrate st
From: |
Peter Xu |
Subject: |
[PATCH v3 04/10] migration: Deliver return path file error to migrate state too |
Date: |
Wed, 4 Oct 2023 18:02:34 -0400 |
We've already did this for most of the return path thread errors, but not
yet for the IO errors happened on the return path qemufile. Do that too.
Re-export qemu_file_get_error_obj().
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/qemu-file.h | 1 +
migration/migration.c | 1 +
migration/qemu-file.c | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/migration/qemu-file.h b/migration/qemu-file.h
index 03e718c264..75efe503c4 100644
--- a/migration/qemu-file.h
+++ b/migration/qemu-file.h
@@ -120,6 +120,7 @@ int coroutine_mixed_fn qemu_peek_byte(QEMUFile *f, int
offset);
void qemu_file_skip(QEMUFile *f, int size);
int qemu_file_get_error_obj_any(QEMUFile *f1, QEMUFile *f2, Error **errp);
void qemu_file_set_error_obj(QEMUFile *f, int ret, Error *err);
+int qemu_file_get_error_obj(QEMUFile *f, Error **errp);
void qemu_file_set_error(QEMUFile *f, int ret);
int qemu_file_shutdown(QEMUFile *f);
QEMUFile *qemu_file_get_return_path(QEMUFile *f);
diff --git a/migration/migration.c b/migration/migration.c
index e821e80094..b28b504b4c 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1884,6 +1884,7 @@ static void *source_return_path_thread(void *opaque)
header_len = qemu_get_be16(rp);
if (qemu_file_get_error(rp)) {
+ qemu_file_get_error_obj(rp, &err);
goto out;
}
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 5e8207dae4..ffa9c0a48a 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -146,7 +146,7 @@ void qemu_file_set_hooks(QEMUFile *f, const QEMUFileHooks
*hooks)
* is not 0.
*
*/
-static int qemu_file_get_error_obj(QEMUFile *f, Error **errp)
+int qemu_file_get_error_obj(QEMUFile *f, Error **errp)
{
if (errp) {
*errp = f->last_error_obj ? error_copy(f->last_error_obj) : NULL;
--
2.41.0
- [PATCH v3 08/10] migration: Allow network to fail even during recovery, (continued)
- [PATCH v3 04/10] migration: Deliver return path file error to migrate state too,
Peter Xu <=
- [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Peter Xu, 2023/10/04
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Fabiano Rosas, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Fabiano Rosas, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Peter Xu, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Fabiano Rosas, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Peter Xu, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Fabiano Rosas, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Fabiano Rosas, 2023/10/09
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Peter Xu, 2023/10/10