return r;
}
-void PeerReplayer::SnapDiffSync::finish_sync() {
+void PeerReplayer::SnapDiffSync::finish_crawl() {
dout(20) << dendl;
while (!m_sync_stack.empty()) {
m_sync_stack.pop();
}
+
+ // Crawl and entry operations are done syncing here. So mark crawl finished here
+ mark_crawl_finished();
}
PeerReplayer::RemoteSync::RemoteSync(MountRef local, MountRef remote, FHandles *fh,
return 0;
}
-void PeerReplayer::RemoteSync::finish_sync() {
+void PeerReplayer::RemoteSync::finish_crawl() {
dout(20) << dendl;
while (!m_sync_stack.empty()) {
m_sync_stack.pop();
}
+
+ // Crawl and entry operations are done syncing here. So mark stack finished here
+ mark_crawl_finished();
}
int PeerReplayer::do_synchronize(const std::string &dir_root, const Snapshot ¤t,
}
}
- syncm->finish_sync();
+ syncm->finish_crawl();
dout(20) << " cur:" << fh.c_fd
<< " prev:" << fh.p_fd
const struct ceph_statx &stx, bool sync_check,
const std::function<int (uint64_t, struct cblock *)> &callback);
- virtual void finish_sync() = 0;
+ virtual void finish_crawl() = 0;
void push_dataq_entry(PeerReplayer::SyncEntry e);
bool pop_dataq_entry(PeerReplayer::SyncEntry &out);
const std::function<int (const std::string&)> &dirsync_func,
const std::function<int (const std::string&)> &purge_func);
- void finish_sync();
+ void finish_crawl();
};
class SnapDiffSync : public SyncMechanism {
const struct ceph_statx &stx, bool sync_check,
const std::function<int (uint64_t, struct cblock *)> &callback);
- void finish_sync();
+ void finish_crawl();
private:
int init_directory(const std::string &epath,