diff options
author | Steve Sistare <steven.sistare@oracle.com> | 2024-03-11 10:48:55 -0700 |
---|---|---|
committer | Peter Xu <peterx@redhat.com> | 2024-03-11 16:28:59 -0400 |
commit | 20c64c8a51a477115589b3a9f7304e423dcbe7f2 (patch) | |
tree | 6d721b0f1f455dd4fa1bb62897513c739e23323c /migration | |
parent | 9bb630c6ee6e930e1c521829681365e5672bbd99 (diff) |
migration: migration_file_set_error
Define and export migration_file_set_error to eliminate a dependency
on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-9-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/migration.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c index db1e627848..216f63d62b 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -3038,6 +3038,17 @@ static MigThrError postcopy_pause(MigrationState *s) } } +void migration_file_set_error(int err) +{ + MigrationState *s = current_migration; + + WITH_QEMU_LOCK_GUARD(&s->qemu_file_lock) { + if (s->to_dst_file) { + qemu_file_set_error(s->to_dst_file, err); + } + } +} + static MigThrError migration_detect_error(MigrationState *s) { int ret; |