]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rbd-mirror: fix syncing_percent calculation logic in get_replay_status()
authorN Balachandran <nibalach@redhat.com>
Thu, 16 Feb 2023 04:57:02 +0000 (10:27 +0530)
committerN Balachandran <nibalach@redhat.com>
Thu, 16 Feb 2023 04:57:02 +0000 (10:27 +0530)
commitc7ae0f6eb6a8fb08859454d1b2e81d2dc7b0226f
tree7a4a68ef3d17904fc3a39fc40e392bb0d1f7f386
parent8c1d7ce1ddb5b89e403fe2f6aef16e582b1c4733
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>
src/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc