migration/multifd: correct multifd_send_thread to trace the flags
commitff1585d1d8ae5b15d88327e59859d352829caebb
authorWei Wang <wei.w.wang@intel.com>
Thu, 9 Mar 2023 10:29:56 +0000 (9 18:29 +0800)
committerJuan Quintela <quintela@redhat.com>
Thu, 16 Mar 2023 15:07:07 +0000 (16 16:07 +0100)
tree50c9aaf1458dd5ca37f2896d41739110b4ccf6a0
parentbf0274192a6c1aac67ca6ee6a96b5f295cfc8d0a
migration/multifd: correct multifd_send_thread to trace the flags

The p->flags could be updated via the send_prepare callback, e.g. OR-ed
with MULTIFD_FLAG_ZLIB via zlib_send_prepare. Assign p->flags to the
local "flags" before the send_prepare callback could only get partial of
p->flags. Fix it by moving the assignment of p->flags to the local flags
after the callback, so that the correct flags can be traced.

Fixes: ab7cbb0b9a3b ("multifd: Make no compression operations into its own structure")
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/multifd.c