Skip to content

Commit 1d96a6c

Browse files
committed
osd/crimson/pg: support cluster_osdmap_trim_lower_bound()
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
1 parent d8981bc commit 1d96a6c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/crimson/osd/pg.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,7 @@ class PG : public boost::intrusive_ref_counter<
348348
void on_active_advmap(const OSDMapRef &osdmap) final;
349349

350350
epoch_t cluster_osdmap_trim_lower_bound() final {
351-
// TODO
352-
return 0;
351+
return shard_services.get_osdmap_tlb();
353352
}
354353

355354
void on_backfill_reserved() final {

src/crimson/osd/shard_services.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ class PerShardState {
7777
PerfCounters *perf = nullptr;
7878
PerfCounters *recoverystate_perf = nullptr;
7979

80+
const epoch_t& get_osdmap_tlb() {
81+
return per_shard_superblock.cluster_osdmap_trim_lower_bound;
82+
}
83+
8084
// Op Management
8185
OSDOperationRegistry registry;
8286
OperationThrottler throttler;
@@ -514,6 +518,7 @@ class ShardServices : public OSDMapService {
514518
FORWARD_TO_LOCAL_CONST(get_mnow)
515519
FORWARD_TO_LOCAL(get_hb_stamps)
516520
FORWARD_TO_LOCAL(update_shard_superblock)
521+
FORWARD_TO_LOCAL(get_osdmap_tlb)
517522

518523
FORWARD(pg_created, pg_created, local_state.pg_map)
519524

0 commit comments

Comments
 (0)