mirror of https://github.com/xemu-project/xemu.git
Migration pull for 9.2-rc2
- Fabiano's patch to remove double vmstate cleanup in postcopy - Peter's patch to whitelist pipes in fd migration URIs -----BEGIN PGP SIGNATURE----- iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCZ0TqmRIccGV0ZXJ4QHJl ZGhhdC5jb20ACgkQO1/MzfOr1waJ7AD8Cb8tHkjFG25Q3ufRrkj3d05oVZDRU4lx 6bgku9xbUQ0A/1ruu96sy89q9t9facPHn+y/0xmmpBJMB5EJ1Jxunm0M =2Ctw -----END PGP SIGNATURE----- Merge tag 'migration-20241125-pull-request' of https://gitlab.com/peterx/qemu into staging Migration pull for 9.2-rc2 - Fabiano's patch to remove double vmstate cleanup in postcopy - Peter's patch to whitelist pipes in fd migration URIs # -----BEGIN PGP SIGNATURE----- # # iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCZ0TqmRIccGV0ZXJ4QHJl # ZGhhdC5jb20ACgkQO1/MzfOr1waJ7AD8Cb8tHkjFG25Q3ufRrkj3d05oVZDRU4lx # 6bgku9xbUQ0A/1ruu96sy89q9t9facPHn+y/0xmmpBJMB5EJ1Jxunm0M # =2Ctw # -----END PGP SIGNATURE----- # gpg: Signature made Mon 25 Nov 2024 21:22:33 GMT # gpg: using EDDSA key B9184DC20CC457DACF7DD1A93B5FCCCDF3ABD706 # gpg: issuer "peterx@redhat.com" # gpg: Good signature from "Peter Xu <xzpeter@gmail.com>" [marginal] # gpg: aka "Peter Xu <peterx@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: B918 4DC2 0CC4 57DA CF7D D1A9 3B5F CCCD F3AB D706 * tag 'migration-20241125-pull-request' of https://gitlab.com/peterx/qemu: migration: Fix extra cleanup at postcopy listen migration: Allow pipes to keep working for fd migrations Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
1af7cba50c
|
@ -25,6 +25,29 @@
|
|||
#include "io/channel-util.h"
|
||||
#include "trace.h"
|
||||
|
||||
static bool fd_is_pipe(int fd)
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
||||
if (fstat(fd, &statbuf) == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return S_ISFIFO(statbuf.st_mode);
|
||||
}
|
||||
|
||||
static bool migration_fd_valid(int fd)
|
||||
{
|
||||
if (fd_is_socket(fd)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (fd_is_pipe(fd)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Error **errp)
|
||||
{
|
||||
|
@ -34,7 +57,7 @@ void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Error **
|
|||
return;
|
||||
}
|
||||
|
||||
if (!fd_is_socket(fd)) {
|
||||
if (!migration_fd_valid(fd)) {
|
||||
warn_report("fd: migration to a file is deprecated."
|
||||
" Use file: instead.");
|
||||
}
|
||||
|
@ -68,7 +91,7 @@ void fd_start_incoming_migration(const char *fdname, Error **errp)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!fd_is_socket(fd)) {
|
||||
if (!migration_fd_valid(fd)) {
|
||||
warn_report("fd: migration to a file is deprecated."
|
||||
" Use file: instead.");
|
||||
}
|
||||
|
|
|
@ -2057,7 +2057,6 @@ static void *postcopy_ram_listen_thread(void *opaque)
|
|||
* got a bad migration state).
|
||||
*/
|
||||
migration_incoming_state_destroy();
|
||||
qemu_loadvm_state_cleanup();
|
||||
|
||||
rcu_unregister_thread();
|
||||
mis->have_listen_thread = false;
|
||||
|
|
Loading…
Reference in New Issue