From: Kotresh HR Date: Sun, 15 Feb 2026 09:37:09 +0000 (+0530) Subject: tools/cephfs_mirror: Don't use blockdiff on smaller files X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fcf7982ea45d67355c90f36e76793218bfe00df5;p=ceph-ci.git tools/cephfs_mirror: Don't use blockdiff on smaller files Use blockdiff only if the file size is greater than 16MiB Fixes: https://tracker.ceph.com/issues/73452 Signed-off-by: Kotresh HR --- diff --git a/src/tools/cephfs_mirror/PeerReplayer.cc b/src/tools/cephfs_mirror/PeerReplayer.cc index c2d25be9a8b..9ce6ed3288f 100644 --- a/src/tools/cephfs_mirror/PeerReplayer.cc +++ b/src/tools/cephfs_mirror/PeerReplayer.cc @@ -1707,7 +1707,8 @@ int PeerReplayer::SnapDiffSync::get_changed_blocks(const std::string &epath, dout(20) << ": dir_root=" << m_dir_root << ", epath=" << epath << ", sync_check=" << sync_check << dendl; - if (!sync_check) { + static constexpr uint64_t MIN_BYTES_BLOCKDIFF = 1ULL * 16 * 1024 * 1024; // 16MiB + if (!sync_check || stx.stx_size <= MIN_BYTES_BLOCKDIFF) { return SyncMechanism::get_changed_blocks(epath, stx, sync_check, callback); }