# define MAX(a,b) ((a)>=(b) ? (a):(b))
#endif
-#include "cpp-btree/btree_map.h"
-#include "assert.h"
-#include "encoding_btree.h"
+#include "btree_map.h"
template<typename T,
typename Alloc = std::allocator<std::pair<const T, T>>>
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#ifndef CEPH_INCLUDE_BTREE_MAP_H
+#define CEPH_INCLUDE_BTREE_MAP_H
+
+#include "include/cpp-btree/btree.h"
+#include "include/cpp-btree/btree_map.h"
+#include "include/assert.h" // cpp-btree uses system assert, blech
+#include "include/encoding.h"
+
+template<class T, class U>
+inline void encode(const btree::btree_map<T,U>& m, bufferlist& bl)
+{
+ __u32 n = (__u32)(m.size());
+ encode(n, bl);
+ 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 encode(const btree::btree_map<T,U>& m, bufferlist& bl, uint64_t features)
+{
+ __u32 n = (__u32)(m.size());
+ encode(n, bl);
+ for (typename btree::btree_map<T,U>::const_iterator p = m.begin(); p != m.end(); ++p) {
+ encode(p->first, bl, features);
+ encode(p->second, bl, features);
+ }
+}
+template<class T, class U>
+inline void decode(btree::btree_map<T,U>& m, bufferlist::iterator& p)
+{
+ __u32 n;
+ decode(n, p);
+ m.clear();
+ while (n--) {
+ T k;
+ decode(k, p);
+ decode(m[k], p);
+ }
+}
+template<class T, class U>
+inline void encode_nohead(const btree::btree_map<T,U>& m, bufferlist& bl)
+{
+ 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::iterator& p)
+{
+ m.clear();
+ while (n--) {
+ T k;
+ decode(k, p);
+ decode(m[k], p);
+ }
+}
+
+#endif
+++ /dev/null
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
-#ifndef CEPH_INCLUDE_ENCODING_BTREE_H
-#define CEPH_INCLUDE_ENCODING_BTREE_H
-
-#include "include/cpp-btree/btree_map.h"
-
-template<class T, class U>
-inline void encode(const btree::btree_map<T,U>& m, bufferlist& bl)
-{
- __u32 n = (__u32)(m.size());
- encode(n, bl);
- 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 encode(const btree::btree_map<T,U>& m, bufferlist& bl, uint64_t features)
-{
- __u32 n = (__u32)(m.size());
- encode(n, bl);
- for (typename btree::btree_map<T,U>::const_iterator p = m.begin(); p != m.end(); ++p) {
- encode(p->first, bl, features);
- encode(p->second, bl, features);
- }
-}
-template<class T, class U>
-inline void decode(btree::btree_map<T,U>& m, bufferlist::iterator& p)
-{
- __u32 n;
- decode(n, p);
- m.clear();
- while (n--) {
- T k;
- decode(k, p);
- decode(m[k], p);
- }
-}
-template<class T, class U>
-inline void encode_nohead(const btree::btree_map<T,U>& m, bufferlist& bl)
-{
- 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::iterator& p)
-{
- m.clear();
- while (n--) {
- T k;
- decode(k, p);
- decode(m[k], p);
- }
-}
-
-#endif
#include "include/memory.h"
#include <boost/scoped_ptr.hpp>
#include "include/encoding.h"
-#include "include/cpp-btree/btree.h"
-#include "include/cpp-btree/btree_map.h"
-#include "include/encoding_btree.h"
+#include "include/btree_map.h"
#include "KeyValueDB.h"
#include "osd/osd_types.h"
#ifndef CEPH_OSDMAP_H
#define CEPH_OSDMAP_H
-#include "include/cpp-btree/btree_map.h"
-
/*
* describe properties of the OSD cluster.
* disks, disk groups, total # osds,
#include <set>
#include <map>
#include "include/memory.h"
+#include "include/btree_map.h"
using namespace std;
// forward declaration