From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Juraj Marcin" <jmarcin@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Markus Armbruster" <armbru@redhat.com>,
"Prasad Pandit" <ppandit@redhat.com>,
peterx@redhat.com
Subject: [PATCH v2 2/2] migration: Remove fd: support on files
Date: Thu, 15 Jan 2026 17:55:03 -0500 [thread overview]
Message-ID: <20260115225503.3083355-3-peterx@redhat.com> (raw)
In-Reply-To: <20260115225503.3083355-1-peterx@redhat.com>
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>
---
docs/about/deprecated.rst | 14 ---------
docs/about/removed-features.rst | 9 ++++++
migration/fd.c | 11 ++++---
tests/qtest/migration/precopy-tests.c | 41 ---------------------------
4 files changed, 16 insertions(+), 59 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index dfb0a6eba5..a46cc6b9fd 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -560,17 +560,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.
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index 4aae30918d..ebb46bb3b1 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -710,6 +710,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)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
diff --git a/migration/fd.c b/migration/fd.c
index 9bf9be6acb..fdeece2101 100644
--- a/migration/fd.c
+++ b/migration/fd.c
@@ -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);
diff --git a/tests/qtest/migration/precopy-tests.c b/tests/qtest/migration/precopy-tests.c
index aca7ed51ef..3af8ec2e33 100644
--- a/tests/qtest/migration/precopy-tests.c
+++ b/tests/qtest/migration/precopy-tests.c
@@ -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
/*
--
2.50.1
next prev parent reply other threads:[~2026-01-15 22:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 22:55 [PATCH v2 0/2] migration: feature removals for 11.0 Peter Xu
2026-01-15 22:55 ` [PATCH v2 1/2] migration: Remove zero-blocks capability Peter Xu
2026-01-16 8:49 ` Markus Armbruster
2026-01-15 22:55 ` Peter Xu [this message]
2026-02-17 9:29 ` [PATCH v2 0/2] migration: feature removals for 11.0 Peter Krempa
2026-02-17 9:47 ` Daniel P. Berrangé
2026-02-17 9:55 ` Peter Krempa
2026-02-17 10:08 ` Daniel P. Berrangé
2026-02-17 11:25 ` Markus Armbruster
2026-02-18 21:21 ` Peter Xu
2026-02-19 7:23 ` Markus Armbruster
2026-02-23 10:00 ` Daniel P. Berrangé
2026-02-23 15:56 ` Peter Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260115225503.3083355-3-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=farosas@suse.de \
--cc=jmarcin@redhat.com \
--cc=ppandit@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.