]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
tools/cephfs_mirror: Fix assert while opening handles
authorKotresh HR <khiremat@redhat.com>
Sat, 21 Feb 2026 13:51:02 +0000 (19:21 +0530)
committerKotresh HR <khiremat@redhat.com>
Sat, 21 Feb 2026 20:12:39 +0000 (01:42 +0530)
commitd22201bd44f46cc52677eaedde7a994f8494555f
treec12b1317078980fbd82e7457ebc7b9b1de8ace0e
parentf540d1d6205df00e4c9a880dc267c2824a81402d
tools/cephfs_mirror: Fix assert while opening handles

Issue:
When the crawler or a datasync thread encountered an error,
it's possible that the crawler gets notified by a datasync
thread and bails out resulting in the unregister of the
particular dir_root. The other datasync threads might
still hold the same syncm object and tries to open the
handles during which the following assert is hit.

ceph_assert(it != m_registered.end());

Cause:
This happens because the in_flight counter in syncm object
was tracking if it's processing the actual job from the data
queue.

Fix:
Make in_flight counter in syncm object to track the active
syncm object i.e, inrement as soon as the datasync thread
get a reference to it and decrement when it goes out of
reference.

Fixes: https://tracker.ceph.com/issues/73452
Signed-off-by: Kotresh HR <khiremat@redhat.com>
src/tools/cephfs_mirror/PeerReplayer.cc
src/tools/cephfs_mirror/PeerReplayer.h