diff options
author | Fabiano Rosas <farosas@suse.de> | 2024-06-17 15:57:26 -0300 |
---|---|---|
committer | Fabiano Rosas <farosas@suse.de> | 2024-06-21 09:47:22 -0300 |
commit | b43b61d5bee522dadf44b472af71aab7235c13d5 (patch) | |
tree | f8fc16b33cdc39384d4836d9b18330db89bed3ba /migration/migration-hmp-cmds.c | |
parent | 46cec74c1b71973756d8960a305bae1491ae6259 (diff) |
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>
Diffstat (limited to 'migration/migration-hmp-cmds.c')
-rw-r--r-- | migration/migration-hmp-cmds.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index 9f0e8029e0..7d608d26e1 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -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); } |