[PATCH v3 16/25] migration/channel: Rename migration_channel_connect

Fabiano Rosas posted 25 patches 1 month ago
Maintainers: Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Mark Kanda <mark.kanda@oracle.com>, Ben Chaney <bchaney@akamai.com>, Li Zhijian <lizhijian@fujitsu.com>
There is a newer version of this series
[PATCH v3 16/25] migration/channel: Rename migration_channel_connect
Posted by Fabiano Rosas 1 month ago
Rename migration_channel_connect to indicate this is the source
side. Future patches will do similar changes to the incoming side and
this will avoid inconsistencies in naming.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
 migration/channel.c | 9 +--------
 migration/channel.h | 2 +-
 migration/exec.c    | 2 +-
 migration/fd.c      | 2 +-
 migration/file.c    | 2 +-
 migration/socket.c  | 2 +-
 migration/tls.c     | 2 +-
 7 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/migration/channel.c b/migration/channel.c
index b8d757c17b..f41333adcc 100644
--- a/migration/channel.c
+++ b/migration/channel.c
@@ -61,14 +61,7 @@ out:
     }
 }
 
-
-/**
- * @migration_channel_connect - Create new outgoing migration channel
- *
- * @s: Current migration state
- * @ioc: Channel to which we are connecting
- */
-void migration_channel_connect(MigrationState *s, QIOChannel *ioc)
+void migration_channel_connect_outgoing(MigrationState *s, QIOChannel *ioc)
 {
     trace_migration_set_outgoing_channel(ioc, object_get_typename(OBJECT(ioc)));
 
diff --git a/migration/channel.h b/migration/channel.h
index b361e1c838..574bfec65c 100644
--- a/migration/channel.h
+++ b/migration/channel.h
@@ -28,7 +28,7 @@ typedef enum {
 
 void migration_channel_process_incoming(QIOChannel *ioc);
 
-void migration_channel_connect(MigrationState *s, QIOChannel *ioc);
+void migration_channel_connect_outgoing(MigrationState *s, QIOChannel *ioc);
 
 int migration_channel_read_peek(QIOChannel *ioc,
                                 const char *buf,
diff --git a/migration/exec.c b/migration/exec.c
index d83a07435a..d1629944dc 100644
--- a/migration/exec.c
+++ b/migration/exec.c
@@ -55,7 +55,7 @@ void exec_start_outgoing_migration(MigrationState *s, strList *command,
     }
 
     qio_channel_set_name(ioc, "migration-exec-outgoing");
-    migration_channel_connect(s, ioc);
+    migration_channel_connect_outgoing(s, ioc);
     object_unref(OBJECT(ioc));
 }
 
diff --git a/migration/fd.c b/migration/fd.c
index 0144a70742..150b236fbf 100644
--- a/migration/fd.c
+++ b/migration/fd.c
@@ -70,7 +70,7 @@ void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Error **
     }
 
     qio_channel_set_name(ioc, "migration-fd-outgoing");
-    migration_channel_connect(s, ioc);
+    migration_channel_connect_outgoing(s, ioc);
     object_unref(OBJECT(ioc));
 }
 
diff --git a/migration/file.c b/migration/file.c
index 7bb9c1c79f..935402f36b 100644
--- a/migration/file.c
+++ b/migration/file.c
@@ -122,7 +122,7 @@ void file_start_outgoing_migration(MigrationState *s,
         return;
     }
     qio_channel_set_name(ioc, "migration-file-outgoing");
-    migration_channel_connect(s, ioc);
+    migration_channel_connect_outgoing(s, ioc);
 }
 
 static gboolean file_accept_incoming_migration(QIOChannel *ioc,
diff --git a/migration/socket.c b/migration/socket.c
index 298bac30cc..611915f84d 100644
--- a/migration/socket.c
+++ b/migration/socket.c
@@ -73,7 +73,7 @@ static void socket_outgoing_migration(QIOTask *task,
     }
 
     trace_migration_socket_outgoing_connected();
-    migration_channel_connect(data->s, sioc);
+    migration_channel_connect_outgoing(data->s, sioc);
     return;
 err:
     trace_migration_socket_outgoing_error(error_get_pretty(err));
diff --git a/migration/tls.c b/migration/tls.c
index 837b08294f..89ba52de02 100644
--- a/migration/tls.c
+++ b/migration/tls.c
@@ -114,7 +114,7 @@ static void migration_tls_outgoing_handshake(QIOTask *task,
     }
 
     trace_migration_tls_outgoing_handshake_complete();
-    migration_channel_connect(s, ioc);
+    migration_channel_connect_outgoing(s, ioc);
 }
 
 QIOChannelTLS *migration_tls_client_create(QIOChannel *ioc,
-- 
2.51.0
Re: [PATCH v3 16/25] migration/channel: Rename migration_channel_connect
Posted by Prasad Pandit 2 weeks, 6 days ago
On Fri, 9 Jan 2026 at 18:18, Fabiano Rosas <farosas@suse.de> wrote:
> Rename migration_channel_connect to indicate this is the source
> side. Future patches will do similar changes to the incoming side and
> this will avoid inconsistencies in naming.
>
> Reviewed-by: Peter Xu <peterx@redhat.com>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
>  migration/channel.c | 9 +--------
>  migration/channel.h | 2 +-
>  migration/exec.c    | 2 +-
>  migration/fd.c      | 2 +-
>  migration/file.c    | 2 +-
>  migration/socket.c  | 2 +-
>  migration/tls.c     | 2 +-
>  7 files changed, 7 insertions(+), 14 deletions(-)
>
> diff --git a/migration/channel.c b/migration/channel.c
> index b8d757c17b..f41333adcc 100644
> --- a/migration/channel.c
> +++ b/migration/channel.c
> @@ -61,14 +61,7 @@ out:
>      }
>  }
>
> -
> -/**
> - * @migration_channel_connect - Create new outgoing migration channel
> - *
> - * @s: Current migration state
> - * @ioc: Channel to which we are connecting
> - */
> -void migration_channel_connect(MigrationState *s, QIOChannel *ioc)
> +void migration_channel_connect_outgoing(MigrationState *s, QIOChannel *ioc)
>  {
>      trace_migration_set_outgoing_channel(ioc, object_get_typename(OBJECT(ioc)));
>
> diff --git a/migration/channel.h b/migration/channel.h
> index b361e1c838..574bfec65c 100644
> --- a/migration/channel.h
> +++ b/migration/channel.h
> @@ -28,7 +28,7 @@ typedef enum {
>
>  void migration_channel_process_incoming(QIOChannel *ioc);
>
> -void migration_channel_connect(MigrationState *s, QIOChannel *ioc);
> +void migration_channel_connect_outgoing(MigrationState *s, QIOChannel *ioc);
>
>  int migration_channel_read_peek(QIOChannel *ioc,
>                                  const char *buf,
> diff --git a/migration/exec.c b/migration/exec.c
> index d83a07435a..d1629944dc 100644
> --- a/migration/exec.c
> +++ b/migration/exec.c
> @@ -55,7 +55,7 @@ void exec_start_outgoing_migration(MigrationState *s, strList *command,
>      }
>
>      qio_channel_set_name(ioc, "migration-exec-outgoing");
> -    migration_channel_connect(s, ioc);
> +    migration_channel_connect_outgoing(s, ioc);
>      object_unref(OBJECT(ioc));
>  }
>
> diff --git a/migration/fd.c b/migration/fd.c
> index 0144a70742..150b236fbf 100644
> --- a/migration/fd.c
> +++ b/migration/fd.c
> @@ -70,7 +70,7 @@ void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Error **
>      }
>
>      qio_channel_set_name(ioc, "migration-fd-outgoing");
> -    migration_channel_connect(s, ioc);
> +    migration_channel_connect_outgoing(s, ioc);
>      object_unref(OBJECT(ioc));
>  }
>
> diff --git a/migration/file.c b/migration/file.c
> index 7bb9c1c79f..935402f36b 100644
> --- a/migration/file.c
> +++ b/migration/file.c
> @@ -122,7 +122,7 @@ void file_start_outgoing_migration(MigrationState *s,
>          return;
>      }
>      qio_channel_set_name(ioc, "migration-file-outgoing");
> -    migration_channel_connect(s, ioc);
> +    migration_channel_connect_outgoing(s, ioc);
>  }
>
>  static gboolean file_accept_incoming_migration(QIOChannel *ioc,
> diff --git a/migration/socket.c b/migration/socket.c
> index 298bac30cc..611915f84d 100644
> --- a/migration/socket.c
> +++ b/migration/socket.c
> @@ -73,7 +73,7 @@ static void socket_outgoing_migration(QIOTask *task,
>      }
>
>      trace_migration_socket_outgoing_connected();
> -    migration_channel_connect(data->s, sioc);
> +    migration_channel_connect_outgoing(data->s, sioc);
>      return;
>  err:
>      trace_migration_socket_outgoing_error(error_get_pretty(err));
> diff --git a/migration/tls.c b/migration/tls.c
> index 837b08294f..89ba52de02 100644
> --- a/migration/tls.c
> +++ b/migration/tls.c
> @@ -114,7 +114,7 @@ static void migration_tls_outgoing_handshake(QIOTask *task,
>      }
>
>      trace_migration_tls_outgoing_handshake_complete();
> -    migration_channel_connect(s, ioc);
> +    migration_channel_connect_outgoing(s, ioc);
>  }
>
>  QIOChannelTLS *migration_tls_client_create(QIOChannel *ioc,
> --

* Looks right.
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>

Thank you.
---
  - Prasad