Skip to content

Commit 1fffa31

Browse files
Merge pull request ceph#61608 from MaxKellermann/mon_includes
mon: include cleanup Reviewed-by: Patrick Donnelly <[email protected]>
2 parents 4df974d + 31d3275 commit 1fffa31

20 files changed

+96
-29
lines changed

src/krbd.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@
3030
#include <utility>
3131

3232
#include "auth/KeyRing.h"
33+
#include "common/ceph_context.h"
3334
#include "common/errno.h"
3435
#include "common/Formatter.h"
3536
#include "common/module.h"
3637
#include "common/run_cmd.h"
3738
#include "common/safe_io.h"
3839
#include "common/secret.h"
40+
#include "common/strtol.h" // for strict_strtoll()
3941
#include "common/TextTable.h"
4042
#include "common/Thread.h"
4143
#include "include/ceph_assert.h"

src/mon/ConfigMap.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
22
// vim: ts=8 sw=2 smarttab
33

4-
#include <boost/algorithm/string/split.hpp>
5-
64
#include "ConfigMap.h"
75
#include "crush/CrushWrapper.h"
86
#include "common/entity_name.h"
97

8+
#include <boost/algorithm/string/split.hpp>
9+
1010
#define dout_subsys ceph_subsys_mon
1111
#undef dout_prefix
1212
#include "common/dout.h"
1313

14+
#include <iomanip>
15+
1416
using namespace std::literals;
1517

1618
using std::cerr;

src/mon/ConfigMap.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33

44
#pragma once
55

6+
#include <list>
67
#include <map>
8+
#include <memory>
79
#include <optional>
810
#include <ostream>
911
#include <string>
1012

13+
#include "include/types.h" // for version_t
1114
#include "include/utime.h"
1215
#include "common/options.h"
1316
#include "common/entity_name.h"

src/mon/ConfigMonitor.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
22
// vim: ts=8 sw=2 smarttab
33

4-
#include <boost/algorithm/string/predicate.hpp>
5-
6-
#include "mon/Monitor.h"
74
#include "mon/ConfigMonitor.h"
5+
#include "mon/Monitor.h"
86
#include "mon/KVMonitor.h"
97
#include "mon/MgrMonitor.h"
108
#include "mon/OSDMonitor.h"
@@ -15,6 +13,9 @@
1513
#include "common/TextTable.h"
1614
#include "common/cmdparse.h"
1715
#include "include/stringify.h"
16+
#include "crush/CrushWrapper.h"
17+
18+
#include <boost/algorithm/string/predicate.hpp>
1819

1920
#define dout_subsys ceph_subsys_mon
2021
#undef dout_prefix

src/mon/ConfigMonitor.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33

44
#pragma once
55

6-
#include <optional>
7-
86
#include "ConfigMap.h"
97
#include "mon/PaxosService.h"
108

9+
#include <map>
10+
#include <optional>
11+
#include <string>
12+
1113
class MonSession;
1214

1315
class ConfigMonitor : public PaxosService

src/mon/ElectionLogic.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
#include "include/ceph_assert.h"
1818
#include "common/dout.h"
1919

20+
#include <iomanip>
21+
#include <ostream>
22+
#include <sstream>
23+
#include <string>
24+
2025
#define dout_subsys ceph_subsys_mon
2126
#undef dout_prefix
2227
#define dout_prefix _prefix(_dout, epoch, elector)

src/mon/ElectionLogic.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#define CEPH_ELECTIONLOGIC_H
1818

1919
#include <map>
20+
#include <memory>
2021
#include <set>
2122
#include "include/types.h"
2223
#include "ConnectionTracker.h"

src/mon/FSCommands.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
*
1313
*/
1414

15-
16-
#include "OSDMonitor.h"
17-
1815
#include "FSCommands.h"
16+
#include "OSDMonitor.h"
1917
#include "MDSMonitor.h"
2018
#include "MgrStatMonitor.h"
2119
#include "mds/cephfs_features.h"
20+
#include "mds/FSMap.h"
21+
#include "osd/OSDMap.h"
22+
#include "common/strtol.h" // for strict_strtoll()
2223

2324
using TOPNSPC::common::cmd_getval;
2425

src/mon/FSCommands.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@
1919
#include "Monitor.h"
2020
#include "CommandHandler.h"
2121

22-
#include "osd/OSDMap.h"
23-
#include "mds/FSMap.h"
24-
22+
#include <iosfwd>
23+
#include <memory>
2524
#include <string>
26-
#include <ostream>
25+
#include <variant>
26+
27+
class Filesystem;
28+
class FSMap;
29+
class OSDMap;
2730

2831
class FileSystemCommandHandler : protected CommandHandler
2932
{

src/mon/MDSMonitor.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "include/ceph_assert.h"
4040
#include "include/str_list.h"
4141
#include "include/stringify.h"
42+
#include "mds/cephfs_features.h"
4243
#include "mds/mdstypes.h"
4344
#include "Session.h"
4445

0 commit comments

Comments
 (0)