mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-06 06:27:41 -07:00
migration: Add direct-io parameter
Add the direct-io migration parameter that tells the migration code to use O_DIRECT when opening the migration stream file whenever possible. This is currently only used with the mapped-ram migration that has a clear window guaranteed to perform aligned writes. Acked-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
parent
46cec74c1b
commit
b43b61d5be
6 changed files with 76 additions and 3 deletions
|
|
@ -351,6 +351,13 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
|
|||
monitor_printf(mon, "%s: %s\n",
|
||||
MigrationParameter_str(MIGRATION_PARAMETER_MODE),
|
||||
qapi_enum_lookup(&MigMode_lookup, params->mode));
|
||||
|
||||
if (params->has_direct_io) {
|
||||
monitor_printf(mon, "%s: %s\n",
|
||||
MigrationParameter_str(
|
||||
MIGRATION_PARAMETER_DIRECT_IO),
|
||||
params->direct_io ? "on" : "off");
|
||||
}
|
||||
}
|
||||
|
||||
qapi_free_MigrationParameters(params);
|
||||
|
|
@ -624,6 +631,10 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
|
|||
p->has_mode = true;
|
||||
visit_type_MigMode(v, param, &p->mode, &err);
|
||||
break;
|
||||
case MIGRATION_PARAMETER_DIRECT_IO:
|
||||
p->has_direct_io = true;
|
||||
visit_type_bool(v, param, &p->direct_io, &err);
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue