]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: fix syncing_percent calculation logic in get_replay_status() 50181/head
authorN Balachandran <nibalach@redhat.com>
Thu, 16 Feb 2023 04:57:02 +0000 (10:27 +0530)
committerN Balachandran <nibalach@redhat.com>
Mon, 20 Feb 2023 11:23:22 +0000 (16:53 +0530)
commit4f340c7899e395ef387a746df8a2753c25e44801
tree5b2bf24d74a6f1f1a17075118afe6fb1c7a94e26
parent1c00f3cc79237967789a56dd5c51cd010ccc69c1
rbd-mirror: fix syncing_percent calculation logic in get_replay_status()

When a snapshot sync is resumed and the get_replay_status function
is called before handle_copy_image_progress, the syncing_percent
value may be greater than 100 as the m_local_object_count is still
set to zero. This commit sets the syncing_percent to 0 in such cases.

Fixes: https://tracker.ceph.com/issues/58706
Signed-off-by: N Balachandran <nibalach@redhat.com>
(cherry picked from commit c7ae0f6eb6a8fb08859454d1b2e81d2dc7b0226f)
src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc