]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rbd-mirror: fix potential infinite loop when formatting status message
authorMykola Golub <mgolub@suse.com>
Wed, 7 Feb 2018 11:09:54 +0000 (13:09 +0200)
committerMykola Golub <mgolub@suse.com>
Wed, 7 Feb 2018 16:30:16 +0000 (18:30 +0200)
commit2fb99b5ed39c36879d1b6180ac47629bc5a3b315
tree84a7ba2fd23c61fbf67072937f6333f5f00b0444
parent4d8bae062560425dade39a4b17cdca7cf8fac8b1
rbd-mirror: fix potential infinite loop when formatting status message

The improvements include:

- tag_tid values should always be increasing, so loop only if
  master.tag_tid > mirror_tag_tid in calculate_behind_master_or_send_update;
- in send_update_tag_cache don't refetch a tag if it is already in the
  cache;
- make fake tags with tag_data.predecessor.tag_tid set to zero;
- make sure the new tag is inserted to the cache if an old entry
  with this id happens to exist.

Fixes: http://tracker.ceph.com/issues/22932
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/tools/rbd_mirror/image_replayer/ReplayStatusFormatter.cc