void AioDiscardEvent::decode(__u8 version, bufferlist::iterator& it) {
::decode(offset, it);
::decode(length, it);
-- if (version >= 5) {
++ if (version >= 4) {
::decode(skip_partial_discard, it);
}
}
void SnapEventBase::decode(__u8 version, bufferlist::iterator& it) {
OpEventBase::decode(version, it);
::decode(snap_name, it);
- if (version >= 6) {
++ if (version >= 4) {
+ cls::rbd::SnapshotNamespaceOnDisk sn;
+ ::decode(sn, it);
+ snap_namespace = sn.snapshot_namespace;
+ }
}
void SnapEventBase::dump(Formatter *f) const {
void SnapCreateEvent::decode(__u8 version, bufferlist::iterator& it) {
SnapEventBase::decode(version, it);
- if (version >= 3) {
- if (3 <= version && version < 6) {
++ if (version == 3) {
cls::rbd::SnapshotNamespaceOnDisk sn;
::decode(sn, it);
snap_namespace = sn.snapshot_namespace;
}
void EventEntry::encode(bufferlist& bl) const {
- ENCODE_START(5, 1, bl);
- ENCODE_START(6, 1, bl);
++ ENCODE_START(4, 1, bl);
boost::apply_visitor(EncodeVisitor(bl), event);
ENCODE_FINISH(bl);
encode_metadata(bl);