summaryrefslogtreecommitdiffstats
path: root/src/crimson/osd/shard_services.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crimson/osd/shard_services.h')
-rw-r--r--src/crimson/osd/shard_services.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/crimson/osd/shard_services.h b/src/crimson/osd/shard_services.h
index d71513a6645..37993a4f679 100644
--- a/src/crimson/osd/shard_services.h
+++ b/src/crimson/osd/shard_services.h
@@ -77,6 +77,10 @@ class PerShardState {
PerfCounters *perf = nullptr;
PerfCounters *recoverystate_perf = nullptr;
+ const epoch_t& get_osdmap_tlb() {
+ return per_shard_superblock.cluster_osdmap_trim_lower_bound;
+ }
+
// Op Management
OSDOperationRegistry registry;
OperationThrottler throttler;
@@ -115,7 +119,7 @@ class PerShardState {
PGMap pg_map;
seastar::future<> stop_pgs();
- std::map<pg_t, pg_stat_t> get_pg_stats() const;
+ std::map<pg_t, pg_stat_t> get_pg_stats();
seastar::future<> broadcast_map_to_pgs(
ShardServices &shard_services,
epoch_t epoch);
@@ -181,6 +185,8 @@ class PerShardState {
HeartbeatStampsRef get_hb_stamps(int peer);
std::map<int, HeartbeatStampsRef> heartbeat_stamps;
+ seastar::future<> update_shard_superblock(OSDSuperblock superblock);
+
// Time state
const ceph::mono_time startup_time;
ceph::signedspan get_mnow() const {
@@ -188,6 +194,8 @@ class PerShardState {
return ceph::mono_clock::now() - startup_time;
}
+ OSDSuperblock per_shard_superblock;
+
public:
PerShardState(
int whoami,
@@ -256,7 +264,7 @@ private:
}
OSDSuperblock superblock;
- void set_superblock(OSDSuperblock _superblock) {
+ void set_singleton_superblock(OSDSuperblock _superblock) {
superblock = std::move(_superblock);
}
@@ -316,6 +324,7 @@ private:
epoch_t e, bufferlist&& bl);
seastar::future<> store_maps(ceph::os::Transaction& t,
epoch_t start, Ref<MOSDMap> m);
+ void trim_maps(ceph::os::Transaction& t, OSDSuperblock& superblock);
};
/**
@@ -508,6 +517,8 @@ public:
FORWARD_TO_OSD_SINGLETON(send_pg_temp)
FORWARD_TO_LOCAL_CONST(get_mnow)
FORWARD_TO_LOCAL(get_hb_stamps)
+ FORWARD_TO_LOCAL(update_shard_superblock)
+ FORWARD_TO_LOCAL(get_osdmap_tlb)
FORWARD(pg_created, pg_created, local_state.pg_map)