mirror of
https://github.com/ceph/ceph
synced 2024-12-28 22:43:29 +00:00
osd: denc_traits for osd_reqid_t
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
09e14f92b9
commit
aa4ab12c64
@ -39,12 +39,17 @@ struct osd_reqid_t {
|
||||
osd_reqid_t(const entity_name_t& a, int i, ceph_tid_t t)
|
||||
: name(a), tid(t), inc(i) {}
|
||||
|
||||
void encode(bufferlist &bl) const;
|
||||
void decode(bufferlist::iterator &bl);
|
||||
DENC(osd_reqid_t, v, p) {
|
||||
DENC_START(2, 2, p);
|
||||
denc(v.name, p);
|
||||
denc(v.tid, p);
|
||||
denc(v.inc, p);
|
||||
DENC_FINISH(p);
|
||||
}
|
||||
void dump(Formatter *f) const;
|
||||
static void generate_test_instances(list<osd_reqid_t*>& o);
|
||||
};
|
||||
WRITE_CLASS_ENCODER(osd_reqid_t)
|
||||
WRITE_CLASS_DENC(osd_reqid_t)
|
||||
|
||||
/**
|
||||
* The OpRequest takes in a Message* and takes over a single reference
|
||||
|
@ -161,24 +161,6 @@ ostream &operator<<(ostream &lhs, const pg_shard_t &rhs)
|
||||
}
|
||||
|
||||
// -- osd_reqid_t --
|
||||
void osd_reqid_t::encode(bufferlist &bl) const
|
||||
{
|
||||
ENCODE_START(2, 2, bl);
|
||||
::encode(name, bl);
|
||||
::encode(tid, bl);
|
||||
::encode(inc, bl);
|
||||
ENCODE_FINISH(bl);
|
||||
}
|
||||
|
||||
void osd_reqid_t::decode(bufferlist::iterator &bl)
|
||||
{
|
||||
DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl);
|
||||
::decode(name, bl);
|
||||
::decode(tid, bl);
|
||||
::decode(inc, bl);
|
||||
DECODE_FINISH(bl);
|
||||
}
|
||||
|
||||
void osd_reqid_t::dump(Formatter *f) const
|
||||
{
|
||||
f->dump_stream("name") << name;
|
||||
|
Loading…
Reference in New Issue
Block a user