summaryrefslogtreecommitdiffstats
path: root/src/crimson/osd/backfill_facades.h
diff options
context:
space:
mode:
authorRadoslaw Zarzynski <rzarzyns@redhat.com>2020-07-13 14:43:33 +0200
committerRadoslaw Zarzynski <rzarzyns@redhat.com>2020-12-01 13:22:15 +0100
commit670c433050ebf1ecbb0003171dc359d42679e35e (patch)
tree17fd1199c4208ff466e65e5fd54df2d686d4dda4 /src/crimson/osd/backfill_facades.h
parentcrimson/osd: drop the depedency on pg_info_t from PGFacade. (diff)
downloadceph-670c433050ebf1ecbb0003171dc359d42679e35e.tar.xz
ceph-670c433050ebf1ecbb0003171dc359d42679e35e.zip
crimson/osd: do not refence PGLog in BackfillState.
This commit makes the backfill code unware about pg log implementation details. The benefit is easier unit testing. Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Diffstat (limited to 'src/crimson/osd/backfill_facades.h')
-rw-r--r--src/crimson/osd/backfill_facades.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/crimson/osd/backfill_facades.h b/src/crimson/osd/backfill_facades.h
index ddebfced603..21b18a8b3b0 100644
--- a/src/crimson/osd/backfill_facades.h
+++ b/src/crimson/osd/backfill_facades.h
@@ -35,9 +35,12 @@ struct BackfillState::PeeringFacade {
return peering_state.get_info().log_tail;
}
- decltype(auto) get_pg_log() const {
- return peering_state.get_pg_log();
+ template <class... Args>
+ void scan_log_after(Args&&... args) const {
+ peering_state.get_pg_log().get_log().scan_log_after(
+ std::forward<Args>(args)...);
}
+
bool is_backfill_target(pg_shard_t peer) const {
return peering_state.is_backfill_target(peer);
}