remove(f.id);
}
- void encode(bufferlist& bl) const {
+ void encode(ceph::buffer::list& bl) const {
using ceph::encode;
/* See below, mask always has the lowest bit set in memory, but
* unset in the encoding */
encode(names, bl);
}
- void decode(bufferlist::const_iterator& bl) {
+ void decode(ceph::buffer::list::const_iterator& bl) {
using ceph::decode;
decode(mask, bl);
decode(names, bl);
}
}
- void dump(Formatter *f) const {
+ void dump(ceph::Formatter *f) const {
for (auto p = names.cbegin(); p != names.cend(); ++p) {
char s[18];
snprintf(s, sizeof(s), "feature_%llu", (unsigned long long)p->first);
return true;
}
- void encode(bufferlist& bl) const {
+ void encode(ceph::buffer::list& bl) const {
compat.encode(bl);
ro_compat.encode(bl);
incompat.encode(bl);
}
-
- void decode(bufferlist::const_iterator& bl) {
+
+ void decode(ceph::buffer::list::const_iterator& bl) {
compat.decode(bl);
ro_compat.decode(bl);
incompat.decode(bl);
}
- void dump(Formatter *f) const {
+ void dump(ceph::Formatter *f) const {
f->open_object_section("compat");
compat.dump(f);
f->close_section();
#include "include/encoding.h"
template<class T, class U>
-inline void encode(const btree::btree_map<T,U>& m, bufferlist& bl)
+inline void encode(const btree::btree_map<T,U>& m, ceph::buffer::list& bl)
{
+ using ceph::encode;
__u32 n = (__u32)(m.size());
encode(n, bl);
for (typename btree::btree_map<T,U>::const_iterator p = m.begin(); p != m.end(); ++p) {
}
}
template<class T, class U>
-inline void encode(const btree::btree_map<T,U>& m, bufferlist& bl, uint64_t features)
+inline void encode(const btree::btree_map<T,U>& m, ceph::buffer::list& bl, uint64_t features)
{
+ using ceph::encode;
__u32 n = (__u32)(m.size());
encode(n, bl);
for (typename btree::btree_map<T,U>::const_iterator p = m.begin(); p != m.end(); ++p) {
}
}
template<class T, class U>
-inline void decode(btree::btree_map<T,U>& m, bufferlist::const_iterator& p)
+inline void decode(btree::btree_map<T,U>& m, ceph::buffer::list::const_iterator& p)
{
+ using ceph::decode;
__u32 n;
decode(n, p);
m.clear();
}
}
template<class T, class U>
-inline void encode_nohead(const btree::btree_map<T,U>& m, bufferlist& bl)
+inline void encode_nohead(const btree::btree_map<T,U>& m, ceph::buffer::list& bl)
{
+ using ceph::encode;
for (typename btree::btree_map<T,U>::const_iterator p = m.begin(); p != m.end(); ++p) {
encode(p->first, bl);
encode(p->second, bl);
}
}
template<class T, class U>
-inline void decode_nohead(int n, btree::btree_map<T,U>& m, bufferlist::const_iterator& p)
+inline void decode_nohead(int n, btree::btree_map<T,U>& m, ceph::buffer::list::const_iterator& p)
{
+ using ceph::decode;
m.clear();
while (n--) {
T k;