#define CEPH_CLS_REFCOUNT_OPS_H
#include "include/types.h"
-
-class Formatter;
+#include "common/hobject.h"
struct cls_refcount_get_op {
string tag;
void encode(bufferlist& bl) const {
ENCODE_START(1, 1, bl);
- ::encode(tag, bl);
- ::encode(implicit_ref, bl);
+ encode(tag, bl);
+ encode(implicit_ref, bl);
ENCODE_FINISH(bl);
}
- void decode(bufferlist::iterator& bl) {
+ void decode(bufferlist::const_iterator& bl) {
DECODE_START(1, bl);
- ::decode(tag, bl);
- ::decode(implicit_ref, bl);
+ decode(tag, bl);
+ decode(implicit_ref, bl);
DECODE_FINISH(bl);
}
void dump(ceph::Formatter *f) const;
void encode(bufferlist& bl) const {
ENCODE_START(1, 1, bl);
- ::encode(tag, bl);
- ::encode(implicit_ref, bl);
+ encode(tag, bl);
+ encode(implicit_ref, bl);
ENCODE_FINISH(bl);
}
- void decode(bufferlist::iterator& bl) {
+ void decode(bufferlist::const_iterator& bl) {
DECODE_START(1, bl);
- ::decode(tag, bl);
- ::decode(implicit_ref, bl);
+ decode(tag, bl);
+ decode(implicit_ref, bl);
DECODE_FINISH(bl);
}
void encode(bufferlist& bl) const {
ENCODE_START(1, 1, bl);
- ::encode(refs, bl);
+ encode(refs, bl);
ENCODE_FINISH(bl);
}
- void decode(bufferlist::iterator& bl) {
+ void decode(bufferlist::const_iterator& bl) {
DECODE_START(1, bl);
- ::decode(refs, bl);
+ decode(refs, bl);
DECODE_FINISH(bl);
}
void encode(bufferlist& bl) const {
ENCODE_START(1, 1, bl);
- ::encode(implicit_ref, bl);
+ encode(implicit_ref, bl);
ENCODE_FINISH(bl);
}
- void decode(bufferlist::iterator& bl) {
+ void decode(bufferlist::const_iterator& bl) {
DECODE_START(1, bl);
- ::decode(implicit_ref, bl);
+ decode(implicit_ref, bl);
DECODE_FINISH(bl);
}
void encode(bufferlist& bl) const {
ENCODE_START(1, 1, bl);
- ::encode(refs, bl);
+ encode(refs, bl);
ENCODE_FINISH(bl);
}
- void decode(bufferlist::iterator& bl) {
+ void decode(bufferlist::const_iterator& bl) {
DECODE_START(1, bl);
- ::decode(refs, bl);
+ decode(refs, bl);
DECODE_FINISH(bl);
}
};
WRITE_CLASS_ENCODER(cls_refcount_read_ret)
+struct obj_refcount {
+ map<string, bool> refs;
+ set<string> retired_refs;
+
+ obj_refcount() {}
+
+ void encode(bufferlist& bl) const {
+ ENCODE_START(2, 1, bl);
+ encode(refs, bl);
+ encode(retired_refs, bl);
+ ENCODE_FINISH(bl);
+ }
+
+ void decode(bufferlist::const_iterator& bl) {
+ DECODE_START(2, bl);
+ decode(refs, bl);
+ if (struct_v >= 2) {
+ decode(retired_refs, bl);
+ }
+ DECODE_FINISH(bl);
+ }
+
+ void dump(ceph::Formatter *f) const;
+ static void generate_test_instances(list<obj_refcount*>& ls);
+};
+WRITE_CLASS_ENCODER(obj_refcount)
#endif