mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2026-10-28 22:44:41 +08:00
migration: Remove fd: support on files
This feature was deprecated in 9.1. Remove it in this release (11.0). We also need to remove one unit test (/migration/precopy/fd/file) that covers the fd: file migration, because it'll stop working now. Reviewed-by: Prasad Pandit <ppandit@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/qemu-devel/20260115225503.3083355-3-peterx@redhat.com Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
1 parent
aa575660d0
commit
f1fcc1c101
4 files changed
+16
-59
No files matched your search
@@ -518,17 +518,3 @@ If the user requests a modern x86 CPU model (i.e. not one of ``486``,
|
||||
``athlon``, ``kvm32``, ``pentium``, ``pentium2``, ``pentium3``or ``qemu32``)
|
||||
a warning will be displayed until a future QEMU version when such CPUs will
|
||||
be rejected.
|
||||
|
||||
Migration
|
||||
---------
|
||||
|
||||
``fd:`` URI when used for file migration (since 9.1)
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
The ``fd:`` URI can currently provide a file descriptor that
|
||||
references either a socket or a plain file. These are two different
|
||||
types of migration. In order to reduce ambiguity, the ``fd:`` URI
|
||||
usage of providing a file descriptor to a plain file has been
|
||||
deprecated in favor of explicitly using the ``file:`` URI with the
|
||||
file descriptor being passed as an ``fdset``. Refer to the ``add-fd``
|
||||
command documentation for details on the ``fdset`` usage.
|
||||
@@ -716,6 +716,15 @@ Use blockdev-mirror with NBD instead. See "QMP invocation for live
|
||||
storage migration with ``blockdev-mirror`` + NBD" in
|
||||
docs/interop/live-block-operations.rst for a detailed explanation.
|
||||
|
||||
``migrate`` command with file-based ``fd:`` URI (removed in 11.0)
|
||||
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
In order to reduce ambiguity, the ``fd:`` URI usage of providing a
|
||||
file descriptor to a plain file has been removed in favor of
|
||||
explicitly using the ``file:`` URI with the file descriptor being
|
||||
passed as an ``fdset``. Refer to the ``add-fd`` command documentation
|
||||
for details on the ``fdset`` usage.
|
||||
|
||||
``migrate-set-capabilities`` ``block`` option (removed in 9.1)
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
|
||||
+7
-4
@@ -24,6 +24,7 @@
|
||||
#include "qemu/sockets.h"
|
||||
#include "io/channel-util.h"
|
||||
#include "trace.h"
|
||||
#include "qapi/error.h"
|
||||
|
||||
static bool fd_is_pipe(int fd)
|
||||
{
|
||||
@@ -58,8 +59,9 @@ void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Error **
|
||||
}
|
||||
|
||||
if (!migration_fd_valid(fd)) {
|
||||
warn_report("fd: migration to a file is deprecated."
|
||||
" Use file: instead.");
|
||||
error_setg(errp, "fd: migration to a file is not supported."
|
||||
" Use file: instead.");
|
||||
return;
|
||||
}
|
||||
|
||||
trace_migration_fd_outgoing(fd);
|
||||
@@ -92,8 +94,9 @@ void fd_start_incoming_migration(const char *fdname, Error **errp)
|
||||
}
|
||||
|
||||
if (!migration_fd_valid(fd)) {
|
||||
warn_report("fd: migration to a file is deprecated."
|
||||
" Use file: instead.");
|
||||
error_setg(errp, "fd: migration to a file is not supported."
|
||||
" Use file: instead.");
|
||||
return;
|
||||
}
|
||||
|
||||
trace_migration_fd_incoming(fd);
|
||||
|
||||
@@ -289,45 +289,6 @@ static void test_precopy_fd_socket(char *name, MigrateCommon *args)
|
||||
|
||||
test_precopy_common(args);
|
||||
}
|
||||
|
||||
static void *migrate_hook_start_precopy_fd_file(QTestState *from,
|
||||
QTestState *to)
|
||||
{
|
||||
g_autofree char *file = g_strdup_printf("%s/%s", tmpfs, FILE_TEST_FILENAME);
|
||||
int src_flags = O_CREAT | O_RDWR;
|
||||
int dst_flags = O_CREAT | O_RDWR;
|
||||
int fds[2];
|
||||
|
||||
fds[0] = open(file, src_flags, 0660);
|
||||
assert(fds[0] != -1);
|
||||
|
||||
fds[1] = open(file, dst_flags, 0660);
|
||||
assert(fds[1] != -1);
|
||||
|
||||
|
||||
qtest_qmp_fds_assert_success(to, &fds[0], 1,
|
||||
"{ 'execute': 'getfd',"
|
||||
" 'arguments': { 'fdname': 'fd-mig' }}");
|
||||
|
||||
qtest_qmp_fds_assert_success(from, &fds[1], 1,
|
||||
"{ 'execute': 'getfd',"
|
||||
" 'arguments': { 'fdname': 'fd-mig' }}");
|
||||
|
||||
close(fds[0]);
|
||||
close(fds[1]);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void test_precopy_fd_file(char *name, MigrateCommon *args)
|
||||
{
|
||||
args->listen_uri = "defer";
|
||||
args->connect_uri = "fd:fd-mig";
|
||||
args->start_hook = migrate_hook_start_precopy_fd_file;
|
||||
args->end_hook = migrate_hook_end_fd;
|
||||
|
||||
test_file_common(args, true);
|
||||
}
|
||||
#endif /* _WIN32 */
|
||||
|
||||
/*
|
||||
@@ -1255,8 +1216,6 @@ void migration_test_add_precopy(MigrationTestEnv *env)
|
||||
#ifndef _WIN32
|
||||
migration_test_add("/migration/precopy/fd/tcp",
|
||||
test_precopy_fd_socket);
|
||||
migration_test_add("/migration/precopy/fd/file",
|
||||
test_precopy_fd_file);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user