All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: yujun <yujun@kylinos.cn>, Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] migration: Fix invalid %ud format and trace arg typo
Date: Tue, 30 Jun 2026 09:55:40 -0300	[thread overview]
Message-ID: <8733y4ur03.fsf@suse.de> (raw)
In-Reply-To: <20260630031324.43453-1-yujun@kylinos.cn>

yujun <yujun@kylinos.cn> writes:

> Standard printf has no %ud conversion; glibc treats it as %u followed
> by a literal 'd', so postcopy userfaultfd error messages printed event
> values like "5d" instead of "5".  The same typo existed in two postcopy
> discard trace format strings.
>
> Also rename the misspelled ram_save_iterate_big_wait() trace argument
> milliconds to milliseconds.
>
> Fixes: 00fa4fc85b ("postcopy: Allow registering of fd handler")
> Signed-off-by: yujun <yujun@kylinos.cn>
> ---
>  migration/postcopy-ram.c | 4 ++--
>  migration/trace-events   | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
> index f5ef93f193..980b938a4c 100644
> --- a/migration/postcopy-ram.c
> +++ b/migration/postcopy-ram.c
> @@ -1368,7 +1368,7 @@ static void *postcopy_ram_fault_thread(void *opaque)
>                  }
>              }
>              if (msg.event != UFFD_EVENT_PAGEFAULT) {
> -                error_report("%s: Read unexpected event %ud from userfaultfd",
> +                error_report("%s: Read unexpected event %u from userfaultfd",
>                               __func__, msg.event);
>                  continue; /* It's not a page fault, shouldn't happen */
>              }
> @@ -1443,7 +1443,7 @@ retry:
>                      }
>                  }
>                  if (msg.event != UFFD_EVENT_PAGEFAULT) {
> -                    error_report("%s: Read unexpected event %ud "
> +                    error_report("%s: Read unexpected event %u "
>                                   "from userfaultfd (shared)",
>                                   __func__, msg.event);
>                      continue; /* It's not a page fault, shouldn't happen */
> diff --git a/migration/trace-events b/migration/trace-events
> index de99d976ab..3b1258c3bf 100644
> --- a/migration/trace-events
> +++ b/migration/trace-events
> @@ -21,14 +21,14 @@ loadvm_postcopy_handle_run(void) ""
>  loadvm_postcopy_handle_resume(void) ""
>  loadvm_postcopy_ram_handle_discard(void) ""
>  loadvm_postcopy_ram_handle_discard_end(void) ""
> -loadvm_postcopy_ram_handle_discard_header(const char *ramid, uint16_t len) "%s: %ud"
> +loadvm_postcopy_ram_handle_discard_header(const char *ramid, uint16_t len) "%s: %u"
>  loadvm_process_command(const char *s, uint16_t len) "com=%s len=%d"
>  loadvm_process_command_ping(uint32_t val) "0x%x"
>  loadvm_approve_switchover(unsigned int switchover_ack_pending_num) "Switchover ack pending num=%u"
>  postcopy_ram_listen_thread_exit(void) ""
>  postcopy_ram_listen_thread_start(void) ""
>  qemu_savevm_send_postcopy_advise(void) ""
> -qemu_savevm_send_postcopy_ram_discard(const char *id, uint16_t len) "%s: %ud"
> +qemu_savevm_send_postcopy_ram_discard(const char *id, uint16_t len) "%s: %u"
>  savevm_command_send(uint16_t command, uint16_t len) "com=0x%x len=%d"
>  savevm_section_start(const char *id, unsigned int section_id) "%s, section_id %u"
>  savevm_section_end(const char *id, unsigned int section_id, int ret) "%s, section_id %u -> %d"
> @@ -119,7 +119,7 @@ colo_flush_ram_cache_begin(uint64_t dirty_pages) "dirty_pages %" PRIu64
>  colo_flush_ram_cache_end(void) ""
>  save_xbzrle_page_skipping(void) ""
>  save_xbzrle_page_overflow(void) ""
> -ram_save_iterate_big_wait(uint64_t milliconds, int iterations) "big wait: %" PRIu64 " milliseconds, %d iterations"
> +ram_save_iterate_big_wait(uint64_t milliseconds, int iterations) "big wait: %" PRIu64 " milliseconds, %d iterations"
>  ram_load_start(void) ""
>  ram_load_complete(int ret, uint64_t seq_iter) "exit_code %d seq iteration %" PRIu64
>  ram_write_tracking_ramblock_start(const char *block_id, size_t page_size, void *addr, size_t length) "%s: page_size: %zu addr: %p length: %zu"

Reviewed-by: Fabiano Rosas <farosas@suse.de>


  reply	other threads:[~2026-06-30 12:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30  3:13 [PATCH] migration: Fix invalid %ud format and trace arg typo yujun
2026-06-30 12:55 ` Fabiano Rosas [this message]
2026-06-30 14:58 ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8733y4ur03.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yujun@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.