]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: fix syncing_percent calculation logic in get_replay_status() 50180/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:21:44 +0000 (16:51 +0530)
commit41557b5d3144686fc5c455c2395dfdda124caa73
tree9fe5e854964d5f9e371dd3612728d9cc03e60f95
parent8bafee95bee29e0c6cfa5080471b6dd208c820e9
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