mirror of
https://github.com/ceph/ceph
synced 2025-04-04 15:36:24 +00:00
poolop: make new encoding backward compatible
This makes cea221c64
behave when messages using the old encoding (that is,
older versions of the client talk to us).
This commit is contained in:
parent
ffc3e63fa1
commit
f6c2e1c49a
@ -52,6 +52,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void encode_payload() {
|
void encode_payload() {
|
||||||
|
header.version = 2;
|
||||||
paxos_encode();
|
paxos_encode();
|
||||||
::encode(fsid, payload);
|
::encode(fsid, payload);
|
||||||
::encode(pool, payload);
|
::encode(pool, payload);
|
||||||
@ -65,10 +66,13 @@ public:
|
|||||||
paxos_decode(p);
|
paxos_decode(p);
|
||||||
::decode(fsid, p);
|
::decode(fsid, p);
|
||||||
::decode(pool, p);
|
::decode(pool, p);
|
||||||
|
if (header.version < 2)
|
||||||
|
::decode(name, p);
|
||||||
::decode(op, p);
|
::decode(op, p);
|
||||||
::decode(auid, p);
|
::decode(auid, p);
|
||||||
::decode(snapid, p);
|
::decode(snapid, p);
|
||||||
::decode(name, p);
|
if (header.version >= 2)
|
||||||
|
::decode(name, p);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user