]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon,auth,common: include necessary headers 23774/head
authorKefu Chai <kchai@redhat.com>
Tue, 28 Aug 2018 12:08:33 +0000 (20:08 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 29 Aug 2018 00:36:26 +0000 (08:36 +0800)
we cannot assume the included header alway indirectly include the use types

in this case, CephContext is defined by ceph_context.h, and
g_ceph_context is declared by global_context.h. so we need to included
them respectively.

and remove unused headers.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/auth/Crypto.cc
src/auth/KeyRing.cc
src/auth/cephx/CephxClientHandler.cc
src/auth/cephx/CephxProtocol.cc
src/common/Cond.h
src/common/ConfUtils.cc
src/common/SloppyCRCMap.cc
src/common/SloppyCRCMap.h
src/include/str_list.h
src/mon/Session.h

index 1b3cca83e9cb01c3aa2c7e15197d3dc2de8df307..b94b7949f44a33cf07ae3bd603af6b7d32911af3 100644 (file)
@@ -23,6 +23,7 @@
 #include "include/assert.h"
 #include "common/Clock.h"
 #include "common/armor.h"
+#include "common/ceph_context.h"
 #include "common/ceph_crypto.h"
 #include "common/hex.h"
 #include "common/safe_io.h"
index 01bb9c761a29b5fa7b6504da23f61ba5d15cb752..387738c87583a5e7eb8d5e888b7f80d532b0c7fb 100644 (file)
@@ -18,6 +18,7 @@
 #include <sstream>
 #include <algorithm>
 #include "auth/KeyRing.h"
+#include "common/ceph_context.h"
 #include "common/config.h"
 #include "common/debug.h"
 #include "common/errno.h"
index 1748fa27e543f5f7667909f4569f869d66384b8d..73e4c7e16d9fa10f2feaa64d0611bbfdcee16f64 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "auth/KeyRing.h"
 #include "include/random.h"
+#include "common/ceph_context.h"
 #include "common/config.h"
 #include "common/dout.h"
 
index 58cc26f3d73efb36bb664be7132d0ab7cf0bd3d1..d57c6e768eedde614e70c03c291423452fe32e36 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "CephxProtocol.h"
 #include "common/Clock.h"
+#include "common/ceph_context.h"
 #include "common/config.h"
 #include "common/debug.h"
 #include "include/buffer.h"
index 061370f1cf410925cfad696c07bd4207ed7d44ec..c74fcfd37872e2f2c796d30f6f6a52134c95d787 100644 (file)
@@ -16,6 +16,7 @@
 #ifndef CEPH_COND_H
 #define CEPH_COND_H
 
+#include "common/Clock.h"
 #include "include/Context.h"
 
 class Cond {
index 7c8f1cc78b7f02cdfea3dd26d49a31a9298216a8..ee008a39ce671136b7f95f028bf8d08fad9860c2 100644 (file)
@@ -14,7 +14,6 @@
 
 #include <algorithm>
 #include <map>
-#include <sstream>
 #include <sys/stat.h>
 #include <iostream>
 
index 58dd7800cbea2005c865c70852433ba691e74c1b..102a6399765d1c68ca78de35249c1f6d0b0d7004 100644 (file)
@@ -2,6 +2,7 @@
 // vim: ts=8 sw=2 smarttab
 
 #include "common/SloppyCRCMap.h"
+#include "common/Formatter.h"
 
 using namespace std;
 
@@ -156,7 +157,7 @@ void SloppyCRCMap::decode(bufferlist::const_iterator& bl)
   DECODE_FINISH(bl);
 }
 
-void SloppyCRCMap::dump(Formatter *f) const
+void SloppyCRCMap::dump(ceph::Formatter *f) const
 {
   f->dump_unsigned("block_size", block_size);
   f->open_array_section("crc_map");
index 7802b6347dd85fcc471ceed1ea31166a1317b19f..0c2d646fa8c57583658aea1620bd0c834d95ad95 100644 (file)
@@ -5,7 +5,10 @@
 #define CEPH_COMMON_SLOPPYCRCMAP_H
 
 #include "include/encoding.h"
-#include "common/Formatter.h"
+
+namespace ceph {
+class Formatter;
+}
 
 /**
  * SloppyCRCMap
@@ -65,7 +68,7 @@ public:
 
   void encode(bufferlist& bl) const;
   void decode(bufferlist::const_iterator& bl);
-  void dump(Formatter *f) const;
+  void dump(ceph::Formatter *f) const;
   static void generate_test_instances(std::list<SloppyCRCMap*>& ls);
 };
 WRITE_CLASS_ENCODER(SloppyCRCMap)
index c8fa914832ce7f90a2752f0fd3fd988e55b6bc72..e4cd7bbbd31b48a1a4b44e6af053e276d8273d32 100644 (file)
@@ -4,9 +4,8 @@
 #include <list>
 #include <set>
 #include <string>
+#include <string_view>
 #include <vector>
-#include <boost/utility/string_view.hpp>
-
 
 namespace ceph {
 
index 8bb4a1ce7927be1d6181de7f155b4fefaa4053e3..efa227b2f83a128a05694c9fc97f17ecd814c64c 100644 (file)
@@ -15,6 +15,7 @@
 #ifndef CEPH_MON_SESSION_H
 #define CEPH_MON_SESSION_H
 
+#include "global/global_context.h"
 #include "include/xlist.h"
 #include "msg/msg_types.h"
 #include "mon/mon_types.h"