* [Qemu-devel] [PATCH] migration: remove useless code.
@ 2016-01-27 6:11 Liang Li
2016-01-27 6:59 ` Fam Zheng
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Liang Li @ 2016-01-27 6:11 UTC (permalink / raw)
To: qemu-devel; +Cc: amit.shah, Liang Li, dgilbert, quintela
Since 's->state' will be set in migrate_init(), there is no
need to set it before calling migrate_init(). The code and
the related comments can be removed.
Signed-off-by: Liang Li <liang.z.li@intel.com>
---
migration/migration.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index aaca451..ae38242 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1006,12 +1006,6 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
return;
}
- /* We are starting a new migration, so we want to start in a clean
- state. This change is only needed if previous migration
- failed/was cancelled. We don't use migrate_set_state() because
- we are setting the initial state, not changing it. */
- s->state = MIGRATION_STATUS_NONE;
-
s = migrate_init(¶ms);
if (strstart(uri, "tcp:", &p)) {
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: remove useless code.
2016-01-27 6:11 [Qemu-devel] [PATCH] migration: remove useless code Liang Li
@ 2016-01-27 6:59 ` Fam Zheng
2016-01-27 9:08 ` Dr. David Alan Gilbert
2016-02-04 10:05 ` Amit Shah
2 siblings, 0 replies; 6+ messages in thread
From: Fam Zheng @ 2016-01-27 6:59 UTC (permalink / raw)
To: Liang Li; +Cc: amit.shah, quintela, qemu-devel, dgilbert
On Wed, 01/27 14:11, Liang Li wrote:
> Since 's->state' will be set in migrate_init(), there is no
> need to set it before calling migrate_init(). The code and
> the related comments can be removed.
Reviewed-by: Fam Zheng <famz@redhat.com>
>
> Signed-off-by: Liang Li <liang.z.li@intel.com>
> ---
> migration/migration.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index aaca451..ae38242 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1006,12 +1006,6 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
> return;
> }
>
> - /* We are starting a new migration, so we want to start in a clean
> - state. This change is only needed if previous migration
> - failed/was cancelled. We don't use migrate_set_state() because
> - we are setting the initial state, not changing it. */
> - s->state = MIGRATION_STATUS_NONE;
> -
> s = migrate_init(¶ms);
>
> if (strstart(uri, "tcp:", &p)) {
> --
> 1.9.1
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: remove useless code.
2016-01-27 6:11 [Qemu-devel] [PATCH] migration: remove useless code Liang Li
2016-01-27 6:59 ` Fam Zheng
@ 2016-01-27 9:08 ` Dr. David Alan Gilbert
2016-02-04 10:05 ` Amit Shah
2 siblings, 0 replies; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2016-01-27 9:08 UTC (permalink / raw)
To: Liang Li; +Cc: amit.shah, qemu-devel, quintela
* Liang Li (liang.z.li@intel.com) wrote:
> Since 's->state' will be set in migrate_init(), there is no
> need to set it before calling migrate_init(). The code and
> the related comments can be removed.
>
> Signed-off-by: Liang Li <liang.z.li@intel.com>
> ---
> migration/migration.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index aaca451..ae38242 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1006,12 +1006,6 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
> return;
> }
>
> - /* We are starting a new migration, so we want to start in a clean
> - state. This change is only needed if previous migration
> - failed/was cancelled. We don't use migrate_set_state() because
> - we are setting the initial state, not changing it. */
> - s->state = MIGRATION_STATUS_NONE;
> -
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> s = migrate_init(¶ms);
>
> if (strstart(uri, "tcp:", &p)) {
> --
> 1.9.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: remove useless code.
2016-01-27 6:11 [Qemu-devel] [PATCH] migration: remove useless code Liang Li
2016-01-27 6:59 ` Fam Zheng
2016-01-27 9:08 ` Dr. David Alan Gilbert
@ 2016-02-04 10:05 ` Amit Shah
2 siblings, 0 replies; 6+ messages in thread
From: Amit Shah @ 2016-02-04 10:05 UTC (permalink / raw)
To: Liang Li; +Cc: qemu-devel, dgilbert, quintela
On (Wed) 27 Jan 2016 [14:11:05], Liang Li wrote:
> Since 's->state' will be set in migrate_init(), there is no
> need to set it before calling migrate_init(). The code and
> the related comments can be removed.
>
> Signed-off-by: Liang Li <liang.z.li@intel.com>
> ---
> migration/migration.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index aaca451..ae38242 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1006,12 +1006,6 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
> return;
> }
>
> - /* We are starting a new migration, so we want to start in a clean
> - state. This change is only needed if previous migration
> - failed/was cancelled. We don't use migrate_set_state() because
> - we are setting the initial state, not changing it. */
> - s->state = MIGRATION_STATUS_NONE;
> -
Looks fine. This was added to ensure a proper init value, but commit
389775d added the init in migrate_init, so this is now redundant.
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Amit
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: remove useless code
2016-04-18 9:19 Liang Li
@ 2016-04-18 9:45 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2016-04-18 9:45 UTC (permalink / raw)
To: Liang Li; +Cc: qemu-devel, quintela, amit.shah
* Liang Li (liang.z.li@intel.com) wrote:
> page_buffer is set twice repeatedly, remove the previous set.
>
> Signed-off-by: Liang Li <liang.z.li@intel.com>
> ---
> migration/ram.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/migration/ram.c b/migration/ram.c
> index 3f05738..31d40f4 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -2322,7 +2322,6 @@ static int ram_load_postcopy(QEMUFile *f)
> ret = -EINVAL;
> break;
> }
> - page_buffer = host;
> /*
> * Postcopy requires that we place whole host pages atomically.
> * To make it atomic, the data is read into a temporary page
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> --
> 1.9.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH] migration: remove useless code
@ 2016-04-18 9:19 Liang Li
2016-04-18 9:45 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 6+ messages in thread
From: Liang Li @ 2016-04-18 9:19 UTC (permalink / raw)
To: qemu-devel; +Cc: quintela, amit.shah, dgilbert, Liang Li
page_buffer is set twice repeatedly, remove the previous set.
Signed-off-by: Liang Li <liang.z.li@intel.com>
---
migration/ram.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index 3f05738..31d40f4 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2322,7 +2322,6 @@ static int ram_load_postcopy(QEMUFile *f)
ret = -EINVAL;
break;
}
- page_buffer = host;
/*
* Postcopy requires that we place whole host pages atomically.
* To make it atomic, the data is read into a temporary page
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-18 9:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-27 6:11 [Qemu-devel] [PATCH] migration: remove useless code Liang Li
2016-01-27 6:59 ` Fam Zheng
2016-01-27 9:08 ` Dr. David Alan Gilbert
2016-02-04 10:05 ` Amit Shah
2016-04-18 9:19 Liang Li
2016-04-18 9:45 ` Dr. David Alan Gilbert
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.