mirror of
https://github.com/ceph/ceph
synced 2024-12-27 14:03:25 +00:00
mds: modernize SimpleLock on-wire encoding
This is a wire protocol change. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
924fb18fd9
commit
78632adca1
@ -544,22 +544,22 @@ public:
|
||||
|
||||
// encode/decode
|
||||
void encode(bufferlist& bl) const {
|
||||
__u8 struct_v = 1;
|
||||
::encode(struct_v, bl);
|
||||
ENCODE_START(2, 2, bl);
|
||||
::encode(state, bl);
|
||||
if (have_more())
|
||||
::encode(more()->gather_set, bl);
|
||||
else
|
||||
::encode(empty_gather_set, bl);
|
||||
ENCODE_FINISH(bl);
|
||||
}
|
||||
void decode(bufferlist::iterator& p) {
|
||||
__u8 struct_v;
|
||||
::decode(struct_v, p);
|
||||
DECODE_START(2, p);
|
||||
::decode(state, p);
|
||||
set<int> g;
|
||||
::decode(g, p);
|
||||
if (!g.empty())
|
||||
more()->gather_set.swap(g);
|
||||
DECODE_FINISH(p);
|
||||
}
|
||||
void encode_state_for_replica(bufferlist& bl) const {
|
||||
__s16 s = get_replica_state();
|
||||
|
Loading…
Reference in New Issue
Block a user