// -- watch_info_t --
-void watch_info_t::encode(bufferlist& bl) const
+void watch_info_t::encode(bufferlist& bl, uint64_t features) const
{
ENCODE_START(4, 3, bl);
::encode(cookie, bl);
::encode(timeout_seconds, bl);
- ::encode(addr, bl);
+ ::encode(addr, bl, features);
ENCODE_FINISH(bl);
}
::encode(truncate_seq, bl);
::encode(truncate_size, bl);
::encode(is_lost(), bl);
- ::encode(old_watchers, bl);
+ ::encode(old_watchers, bl, features);
/* shenanigans to avoid breaking backwards compatibility in the disk format.
* When we can, switch this out for simply putting the version_t on disk. */
eversion_t user_eversion(0, user_version);
::encode(user_eversion, bl);
::encode(test_flag(FLAG_USES_TMAP), bl);
- ::encode(watchers, bl);
+ ::encode(watchers, bl, features);
__u32 _flags = flags;
::encode(_flags, bl);
::encode(local_mtime, bl);
watch_info_t() : cookie(0), timeout_seconds(0) { }
watch_info_t(uint64_t c, uint32_t t, const entity_addr_t& a) : cookie(c), timeout_seconds(t), addr(a) {}
- void encode(bufferlist& bl) const;
+ void encode(bufferlist& bl, uint64_t features) const;
void decode(bufferlist::iterator& bl);
void dump(Formatter *f) const;
static void generate_test_instances(list<watch_info_t*>& o);
};
-WRITE_CLASS_ENCODER(watch_info_t)
+WRITE_CLASS_ENCODER_FEATURES(watch_info_t)
static inline bool operator==(const watch_info_t& l, const watch_info_t& r) {
return l.cookie == r.cookie && l.timeout_seconds == r.timeout_seconds
: name(name), cookie(cookie), timeout_seconds(timeout),
addr(addr) { }
- void encode(bufferlist &bl) const {
+ void encode(bufferlist &bl, uint64_t features) const {
ENCODE_START(2, 1, bl);
::encode(name, bl);
::encode(cookie, bl);
::encode(timeout_seconds, bl);
- ::encode(addr, bl);
+ ::encode(addr, bl, features);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_FINISH(bl);
}
};
-WRITE_CLASS_ENCODER(watch_item_t)
+WRITE_CLASS_ENCODER_FEATURES(watch_item_t)
struct obj_watch_item_t {
hobject_t obj;
struct obj_list_watch_response_t {
list<watch_item_t> entries;
- void encode(bufferlist& bl) const {
+ void encode(bufferlist& bl, uint64_t features) const {
ENCODE_START(1, 1, bl);
- ::encode(entries, bl);
+ ::encode(entries, bl, features);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator& bl) {
o.back()->entries.push_back(watch_item_t(entity_name_t(entity_name_t::TYPE_CLIENT, 2), 20, 60, ea));
}
};
-
-WRITE_CLASS_ENCODER(obj_list_watch_response_t)
+WRITE_CLASS_ENCODER_FEATURES(obj_list_watch_response_t)
struct clone_info {
snapid_t cloneid;