void MirrorPeerClientMeta::encode(bufferlist& bl) const {
::encode(image_id, bl);
+ ::encode(sync_object_count, bl);
::encode(static_cast<uint32_t>(sync_points.size()), bl);
for (auto &sync_point : sync_points) {
sync_point.encode(bl);
void MirrorPeerClientMeta::decode(__u8 version, bufferlist::iterator& it) {
::decode(image_id, it);
+ ::decode(sync_object_count, it);
uint32_t sync_point_count;
::decode(sync_point_count, it);
void MirrorPeerClientMeta::dump(Formatter *f) const {
f->dump_string("image_id", image_id);
+ f->dump_unsigned("sync_object_count", sync_object_count);
f->open_array_section("sync_points");
for (auto &sync_point : sync_points) {
f->open_object_section("sync_point");
std::ostream &operator<<(std::ostream &out, const MirrorPeerClientMeta &meta) {
out << "[image_id=" << meta.image_id << ", "
+ << "sync_object_count=" << meta.sync_object_count << ", "
<< "sync_points=[";
std::string delimiter;
for (auto &sync_point : meta.sync_points) {
static const ClientMetaType TYPE = MIRROR_PEER_CLIENT_META_TYPE;
std::string image_id;
- SyncPoints sync_points; ///< max two in-use snapshots for sync
- SnapSeqs snap_seqs; ///< local to peer snap seq mapping
+ uint64_t sync_object_count = 0; ///< maximum number of objects ever sync'ed
+ SyncPoints sync_points; ///< max two in-use snapshots for sync
+ SnapSeqs snap_seqs; ///< local to peer snap seq mapping
MirrorPeerClientMeta() {
}
inline bool operator==(const MirrorPeerClientMeta &meta) const {
return (image_id == meta.image_id &&
+ sync_object_count == meta.sync_object_count &&
sync_points == meta.sync_points &&
snap_seqs == meta.snap_seqs);
}