mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
migration: remove the QEMUFileOps abstraction
Now that all QEMUFile callbacks are removed, the entire concept can be deleted. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
02bdbe172d
commit
77ef2dc1c8
12 changed files with 27 additions and 128 deletions
|
@ -37,7 +37,6 @@
|
|||
#include "migration/global_state.h"
|
||||
#include "migration/channel-block.h"
|
||||
#include "ram.h"
|
||||
#include "qemu-file-channel.h"
|
||||
#include "qemu-file.h"
|
||||
#include "savevm.h"
|
||||
#include "postcopy-ram.h"
|
||||
|
@ -134,11 +133,9 @@ static struct mig_cmd_args {
|
|||
static QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs, int is_writable)
|
||||
{
|
||||
if (is_writable) {
|
||||
return qemu_fopen_channel_output(
|
||||
QIO_CHANNEL(qio_channel_block_new(bs)));
|
||||
return qemu_file_new_output(QIO_CHANNEL(qio_channel_block_new(bs)));
|
||||
} else {
|
||||
return qemu_fopen_channel_input(
|
||||
QIO_CHANNEL(qio_channel_block_new(bs)));
|
||||
return qemu_file_new_input(QIO_CHANNEL(qio_channel_block_new(bs)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2161,7 +2158,7 @@ static int loadvm_handle_cmd_packaged(MigrationIncomingState *mis)
|
|||
bioc->usage += length;
|
||||
trace_loadvm_handle_cmd_packaged_received(ret);
|
||||
|
||||
QEMUFile *packf = qemu_fopen_channel_input(QIO_CHANNEL(bioc));
|
||||
QEMUFile *packf = qemu_file_new_input(QIO_CHANNEL(bioc));
|
||||
|
||||
ret = qemu_loadvm_state_main(packf, mis);
|
||||
trace_loadvm_handle_cmd_packaged_main(ret);
|
||||
|
@ -2919,7 +2916,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live,
|
|||
goto the_end;
|
||||
}
|
||||
qio_channel_set_name(QIO_CHANNEL(ioc), "migration-xen-save-state");
|
||||
f = qemu_fopen_channel_output(QIO_CHANNEL(ioc));
|
||||
f = qemu_file_new_output(QIO_CHANNEL(ioc));
|
||||
object_unref(OBJECT(ioc));
|
||||
ret = qemu_save_device_state(f);
|
||||
if (ret < 0 || qemu_fclose(f) < 0) {
|
||||
|
@ -2966,7 +2963,7 @@ void qmp_xen_load_devices_state(const char *filename, Error **errp)
|
|||
return;
|
||||
}
|
||||
qio_channel_set_name(QIO_CHANNEL(ioc), "migration-xen-load-state");
|
||||
f = qemu_fopen_channel_input(QIO_CHANNEL(ioc));
|
||||
f = qemu_file_new_input(QIO_CHANNEL(ioc));
|
||||
object_unref(OBJECT(ioc));
|
||||
|
||||
ret = qemu_loadvm_state(f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue