OSD's left header dependency optimize.
Signed-off-by: Xiaowei Chen <chen.xiaowei@h3c.com>
// vim: ts=8 sw=2 smarttab
#include "include/types.h"
-#include "msg/Message.h"
-#include "osd/OSD.h"
#include "ClassHandler.h"
#include "common/errno.h"
+#include "common/ceph_context.h"
#include <dlfcn.h>
#endif
#include "common/config.h"
+#include "common/debug.h"
#define dout_subsys ceph_subsys_osd
#undef dout_prefix
#define CEPH_CLASSHANDLER_H
#include "include/types.h"
-
#include "objclass/objclass.h"
-
-#include "common/Cond.h"
#include "common/Mutex.h"
-#include "common/ceph_context.h"
+//forward declaration
+class CephContext;
class ClassHandler
{
#include "common/perf_counters.h"
#include "common/Timer.h"
#include "common/LogClient.h"
+#include "common/AsyncReserver.h"
#include "common/HeartbeatMap.h"
#include "common/admin_socket.h"
+#include "common/ceph_context.h"
#include "global/signal_handler.h"
#include "global/pidfile.h"
#include "perfglue/cpu_profiler.h"
#include "perfglue/heap_profiler.h"
-#include "osd/ClassHandler.h"
#include "osd/OpRequest.h"
#include "auth/AuthAuthorizeHandler.h"
-
#include "common/errno.h"
#include "objclass/objclass.h"
#ifndef CEPH_OSD_H
#define CEPH_OSD_H
-#include "boost/tuple/tuple.hpp"
-
#include "PG.h"
#include "msg/Dispatcher.h"
#include "common/RWLock.h"
#include "common/Timer.h"
#include "common/WorkQueue.h"
-#include "common/LogClient.h"
#include "common/AsyncReserver.h"
-#include "common/ceph_context.h"
-
#include "os/ObjectStore.h"
-#include "OSDCap.h"
-
+#include "OSDCap.h"
+
+#include "auth/KeyRing.h"
#include "osd/ClassHandler.h"
#include "include/CompatSet.h"
-#include "auth/KeyRing.h"
-#include "messages/MOSDRepScrub.h"
#include "OpRequest.h"
#include <atomic>
#include "include/unordered_map.h"
-#include "Watch.h"
#include "common/shared_cache.hpp"
#include "common/simple_cache.hpp"
#include "common/sharedptr_registry.hpp"
#include "common/WeightedPriorityQueue.h"
#include "common/PrioritizedQueue.h"
-#include "common/OpQueue.h"
#include "messages/MOSDOp.h"
#include "include/Spinlock.h"
class HistoricOpsSocketHook;
class TestOpsSocketHook;
struct C_CompleteSplits;
-
+class LogChannel;
+class CephContext;
typedef ceph::shared_ptr<ObjectStore::Sequencer> SequencerRef;
+class MOSDOp;
class DeletingState {
Mutex lock;
#include "common/TextTable.h"
#include "include/ceph_features.h"
#include "include/str_map.h"
-#include "include/stringify.h"
#include "common/code_environment.h"
#include "crush/CrushTreeDumper.h"
-
+#include "common/Clock.h"
+
#define dout_subsys ceph_subsys_osd
// ----------------------------------
* disks, disk groups, total # osds,
*
*/
-#include "common/config.h"
#include "include/types.h"
#include "osd_types.h"
-#include "include/ceph_features.h"
-
+//#include "include/ceph_features.h"
#include "crush/CrushWrapper.h"
-
-#include "include/interval_set.h"
-
#include <vector>
#include <list>
#include <set>
#include "include/memory.h"
using namespace std;
-
+//forward declaration
+class CephContext;
+class CrushWrapper;
/*
* we track up to two intervals during which the osd was alive and
* healthy. the most recent is [up_from,up_thru), where up_thru is
*/
#include "PGLog.h"
-#include "PG.h"
-#include "SnapMapper.h"
-#include "../include/unordered_map.h"
+#include "include/unordered_map.h"
+#include "common/ceph_context.h"
#define dout_subsys ceph_subsys_osd
#undef dout_prefix
#include "include/assert.h"
#include "osd_types.h"
#include "os/ObjectStore.h"
-#include "common/ceph_context.h"
#include <list>
using namespace std;
#define PGLOG_INDEXED_EXTRA_CALLER_OPS (1 << 2)
#define PGLOG_INDEXED_ALL (PGLOG_INDEXED_OBJECTS | PGLOG_INDEXED_CALLER_OPS | PGLOG_INDEXED_EXTRA_CALLER_OPS)
+class CephContext;
+
struct PGLog : DoutPrefixProvider {
DoutPrefixProvider *prefix_provider;
string gen_prefix() const {
#ifndef CEPH_WATCH_H
#define CEPH_WATCH_H
-#include <boost/intrusive_ptr.hpp>
#include "include/memory.h"
#include <set>
#include "msg/Messenger.h"
#include "include/Context.h"
-#include "common/Mutex.h"
enum WatcherState {
WATCHER_PENDING,