encode(primary_snap_id, bl);
encode(copied, bl);
encode(last_copied_object_number, bl);
+ encode(snap_seqs, bl);
}
void MirrorNonPrimarySnapshotNamespace::decode(bufferlist::const_iterator& it) {
decode(primary_snap_id, it);
decode(copied, it);
decode(last_copied_object_number, it);
+ decode(snap_seqs, it);
}
void MirrorNonPrimarySnapshotNamespace::dump(Formatter *f) const {
f->dump_unsigned("primary_snap_id", primary_snap_id);
f->dump_bool("copied", copied);
f->dump_unsigned("last_copied_object_number", last_copied_object_number);
+ f->dump_stream("snap_seqs") << snap_seqs;
}
class EncodeSnapshotNamespaceVisitor : public boost::static_visitor<void> {
<< "primary_mirror_uuid=" << ns.primary_mirror_uuid << ", "
<< "primary_snap_id=" << ns.primary_snap_id << ", "
<< "copied=" << ns.copied << ", "
- << "last_copied_object_number=" << ns.last_copied_object_number
+ << "last_copied_object_number=" << ns.last_copied_object_number << ", "
+ << "snap_seqs=" << ns.snap_seqs
<< "]";
return os;
}
}
};
+typedef std::map<uint64_t, uint64_t> SnapSeqs;
+
struct MirrorNonPrimarySnapshotNamespace {
static const SnapshotNamespaceType SNAPSHOT_NAMESPACE_TYPE =
SNAPSHOT_NAMESPACE_TYPE_MIRROR_NON_PRIMARY;
snapid_t primary_snap_id = CEPH_NOSNAP;
bool copied = false;
uint64_t last_copied_object_number = 0;
+ SnapSeqs snap_seqs;
MirrorNonPrimarySnapshotNamespace() {
}