migration: Check current_migration in migration_is_running()
PATCH 1/1 migration: Check current_migration in migration_is_running()
Report shows that commit 34a8892dec broke iotest 055:
https://lore.kernel.org/r/[email protected]
When replacing migration_is_idle() with "!migration_is_running()", it was overlooked that the idle helper also checks for current_migration being available first.
The check would be there if the whole series was applied, but since the last patches in the previous series rely on some other patches to land first, we need to recover the behavior of migration_is_idle() first before that whole set will be merged.
I left migration_is_active / migration_is_device alone, as I don't think it's possible for them to hit his case (current_migration not initialized). Also they're prone to removal soon from VFIO side.
--- migration/migration.c | 4 ++++ 1 file changed, 4 insertions(+)
migration/migration.c +4 -0
@@ -1117,6 +1117,10 @@ bool migration_is_running(void) {MigrationState *s = current_migration; +if (!s) { +return false; + } +switch (s->state) {case MIGRATION_STATUS_ACTIVE :case MIGRATION_STATUS_POSTCOPY_ACTIVE :
Signature · 1 line
2.45.0
Quoted 32 lines · Peter Xu
Report shows that commit
34a8892decbroke iotest 055:https://lore.kernel.org/r/[email protected]
When replacing
migration_is_idle()with "!migration_is_running()", it was overlooked that the idle helper also checks forcurrent_migrationbeing available first.The check would be there if the whole series was applied, but since the last patches in the previous series rely on some other patches to land first, we need to recover the behavior of
migration_is_idle()first before that whole set will be merged.I left
migration_is_active/migration_is_devicealone, as I don't think it's possible for them to hit his case (current_migrationnot initialized). Also they're prone to removal soon from VFIO side.Cc Fabiano Rosas <[email protected]>Cc Peter Maydell <[email protected]>Fixes 34a8892dec ("migration: Drop migration_is_idle()")Reported-by Pierrick Bouvier <[email protected]>Tested-by Pierrick Bouvier <[email protected]>Signed-off-by Peter Xu <[email protected]>--- migration/migration.c | 4 ++++ 1 file changed, 4 insertions(+)migration/migration.c +0
-0
migration/migration.c bool migration_is_running(void) · line 1126
Quoted 10 lines
migration/migration.c +4
-0@@ -1117,6 +1117,10 @@ bool migration_is_running(void) {MigrationState *s = current_migration; +if (!s) { +return false; + } +switch (s->state) {case MIGRATION_STATUS_ACTIVE :case MIGRATION_STATUS_POSTCOPY_ACTIVE :
Quoted 17 lines · Peter Xu
Report shows that commit
34a8892decbroke iotest 055:https://lore.kernel.org/r/[email protected]
When replacing
migration_is_idle()with "!migration_is_running()", it was overlooked that the idle helper also checks forcurrent_migrationbeing available first.The check would be there if the whole series was applied, but since the last patches in the previous series rely on some other patches to land first, we need to recover the behavior of
migration_is_idle()first before that whole set will be merged.I left
migration_is_active/migration_is_devicealone, as I don't think it's possible for them to hit his case (current_migrationnot initialized). Also they're prone to removal soon from VFIO side.
Quoted 6 lines
Cc Fabiano Rosas <[email protected]>Cc Peter Maydell <[email protected]>Fixes 34a8892dec ("migration: Drop migration_is_idle()")Reported-by Pierrick Bouvier <[email protected]>Tested-by Pierrick Bouvier <[email protected]>Signed-off-by Peter Xu <[email protected]>
Quoted 3 lines · Peter Xu
Report shows that commit
34a8892decbroke iotest 055:
FWIW, this patch also fixes a lot of other broken iotests (vmdk and vpc) that occur when running "make check SPEED=thorough".
Quoted 12 lines · Thomas Huth
Quoted 3 lines · Peter Xu
Report shows that commit
34a8892decbroke iotest 055:FWIW, this patch also fixes a lot of other broken iotests (vmdk and vpc) that occur when running "make check SPEED=thorough".
Tested-by Thomas Huth <[email protected]>
Good news!
I'm a bit confused by your message. I thought SPEED=slow was the most complete test setup, but is it SPEED=thorough instead?
Quoted 9 lines · Pierrick Bouvier
Quoted 8 lines · Thomas Huth
Quoted 3 lines · Peter Xu
Report shows that commit
34a8892decbroke iotest 055:FWIW, this patch also fixes a lot of other broken iotests (vmdk and vpc) that occur when running "make check SPEED=thorough".
Quoted 8 lines
Quoted 4 lines
Tested-by Thomas Huth <[email protected]>Good news!
I'm a bit confused by your message. I thought SPEED=slow was the most complete test setup, but is it SPEED=thorough instead?
It depends... for the qtests, "slow" and "thorough" is the same, but for the iotests, we enable even more additional formats with "thorough".
Thomas