[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/33] migration: equation is more proper than and to
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PULL 16/33] migration: equation is more proper than and to check LOADVM_QUIT |
Date: |
Thu, 15 Aug 2019 17:34:47 +0100 |
From: Wei Yang <address@hidden>
LOADVM_QUIT allows a command to quit all layers of nested loadvm loops,
while current return value check is not that proper even it works now.
Current return value check "ret & LOADVM_QUIT" would return true if
bit[0] is 1. This would be true when ret is -1 which is used to indicate
an error of handling a command.
Since there is only one place return LOADVM_QUIT and no other
combination of return value, use "ret == LOADVM_QUIT" would be more
proper.
Signed-off-by: Wei Yang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
migration/savevm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index eed5e551da..412768216c 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2437,7 +2437,7 @@ retry:
case QEMU_VM_COMMAND:
ret = loadvm_process_command(f);
trace_qemu_loadvm_state_section_command(ret);
- if ((ret < 0) || (ret & LOADVM_QUIT)) {
+ if ((ret < 0) || (ret == LOADVM_QUIT)) {
goto out;
}
break;
--
2.21.0
- [Qemu-devel] [PULL 07/33] migration/postcopy: reduce one operation to calculate fixup_start_addr, (continued)
- [Qemu-devel] [PULL 07/33] migration/postcopy: reduce one operation to calculate fixup_start_addr, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 08/33] migration/postcopy: do_fixup is true when host_offset is non-zero, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 09/33] migration/savevm: flush file for iterable_only case, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 10/33] migration/savevm: split qemu_savevm_state_complete_precopy() into two parts, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 11/33] migration/savevm: move non SaveStateEntry condition check out of iteration, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 12/33] migration/postcopy: PostcopyState is already set in loadvm_postcopy_handle_advise(), Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 13/33] migration/postcopy: start_postcopy could be true only when migrate_postcopy() return true, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 14/33] migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 15/33] migration: just pass RAMBlock is enough, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 17/33] migration: return -EINVAL directly when version_id mismatch, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 16/33] migration: equation is more proper than and to check LOADVM_QUIT,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PULL 18/33] migration: extract ram_load_precopy, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 19/33] migration/postcopy: make PostcopyDiscardState a static variable, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 20/33] migration/postcopy: simplify calculation of run_start and fixup_start_addr, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 21/33] migration/postcopy: use QEMU_IS_ALIGNED to replace host_offset, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 22/33] hmp: Remove migration capabilities from "info migrate", Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 23/33] migration: remove unused field bytes_xfer, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 24/33] migration: always initialise ram_counters for a new migration, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 25/33] migration: add qemu_file_update_transfer interface, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 26/33] migration: add speed limit for multifd migration, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 27/33] migration: update ram_counters for multifd sync packet, Dr. David Alan Gilbert (git), 2019/08/15