[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/26] migration: Truncate state file in xen-save-devices-state
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 15/26] migration: Truncate state file in xen-save-devices-state |
Date: |
Fri, 25 Sep 2020 13:06:44 +0100 |
From: Dov Murik <dovmurik@linux.vnet.ibm.com>
When running the xen-save-devices-state QMP command, if the filename
already exists it will be truncated before dumping the devices' state
into it.
Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
Message-Id: <20200921094830.114028-1-dovmurik@linux.vnet.ibm.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/savevm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index ee21e981ba..34e4b71052 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2803,7 +2803,8 @@ void qmp_xen_save_devices_state(const char *filename,
bool has_live, bool live,
vm_stop(RUN_STATE_SAVE_VM);
global_state_store_running();
- ioc = qio_channel_file_new_path(filename, O_WRONLY | O_CREAT, 0660, errp);
+ ioc = qio_channel_file_new_path(filename, O_WRONLY | O_CREAT | O_TRUNC,
+ 0660, errp);
if (!ioc) {
goto the_end;
}
--
2.26.2
- [PULL 05/26] migration/dirtyrate: Add RamblockDirtyInfo to store sampled page info, (continued)
- [PULL 05/26] migration/dirtyrate: Add RamblockDirtyInfo to store sampled page info, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 06/26] migration/dirtyrate: Add dirtyrate statistics series functions, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 07/26] migration/dirtyrate: move RAMBLOCK_FOREACH_MIGRATABLE into ram.h, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 08/26] migration/dirtyrate: Record hash results for each sampled page, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 09/26] migration/dirtyrate: Compare page hash results for recorded sampled page, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 10/26] migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 11/26] migration/dirtyrate: Implement set_sample_page_period() and is_sample_period_valid(), Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 12/26] migration/dirtyrate: Implement calculate_dirtyrate() function, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 13/26] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 14/26] migration/dirtyrate: Add trace_calls to make it easier to debug, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 15/26] migration: Truncate state file in xen-save-devices-state,
Dr. David Alan Gilbert (git) <=
- [PULL 16/26] migration: increase max-bandwidth to 128 MiB/s (1 Gib/s), Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 17/26] migration/tls: save hostname into MigrationState, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 18/26] migration/tls: extract migration_tls_client_create for common-use, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 19/26] migration/tls: add tls_hostname into MultiFDSendParams, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 20/26] migration/tls: extract cleanup function for common-use, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 21/26] migration/tls: add support for multifd tls-handshake, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 22/26] migration/tls: add trace points for multifd-tls, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 24/26] virtiofsd: document cache=auto default, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 25/26] virtiofsd: Used glib "shared" thread pool, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 26/26] virtiofsd: Add -o allow_direct_io|no_allow_direct_io options, Dr. David Alan Gilbert (git), 2020/09/25