]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #12970 from VictorDenisov/snapshot_namespace_index
authorJason Dillaman <dillaman@redhat.com>
Fri, 17 Mar 2017 16:55:48 +0000 (12:55 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 17 Mar 2017 16:57:56 +0000 (12:57 -0400)
librbd: add SnapshotNamespace to ImageCtx

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
1  2 
src/librbd/journal/Types.cc

index cef0dbfd13028d62ee93605b286514d83f213523,249bc9122d202b610e6b27641bb68d0e6167c5e8..c30a5752df290b8044c76edaa75d090accb8c827
@@@ -77,7 -77,7 +77,7 @@@ void AioDiscardEvent::encode(bufferlist
  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);
    }
  }
@@@ -173,6 -174,11 +174,11 @@@ void SnapEventBase::encode(bufferlist& 
  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 {
@@@ -187,7 -193,7 +193,7 @@@ void SnapCreateEvent::encode(bufferlis
  
  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;
@@@ -340,7 -347,7 +347,7 @@@ EventType EventEntry::get_event_type() 
  }
  
  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);