summaryrefslogtreecommitdiffstats
path: root/src/osd/PrimaryLogPG.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/PrimaryLogPG.h')
-rw-r--r--src/osd/PrimaryLogPG.h40
1 files changed, 36 insertions, 4 deletions
diff --git a/src/osd/PrimaryLogPG.h b/src/osd/PrimaryLogPG.h
index 323b66e02a7..bf55d539821 100644
--- a/src/osd/PrimaryLogPG.h
+++ b/src/osd/PrimaryLogPG.h
@@ -27,6 +27,7 @@
#include "messages/MOSDOpReply.h"
#include "common/admin_finisher.h"
#include "common/Checksummer.h"
+#include "common/intrusive_timer.h"
#include "common/sharedptr_registry.hpp"
#include "common/shared_cache.hpp"
#include "ReplicatedBackend.h"
@@ -349,6 +350,19 @@ public:
eversion_t v,
Context *on_complete) override;
+ void pg_lock() override {
+ lock();
+ }
+ void pg_unlock() override {
+ unlock();
+ }
+ void pg_add_ref() override {
+ intrusive_ptr_add_ref(this);
+ }
+ void pg_dec_ref() override {
+ intrusive_ptr_release(this);
+ }
+
template<class T> class BlessedGenContext;
template<class T> class UnlockedBlessedGenContext;
class BlessedContext;
@@ -439,6 +453,9 @@ public:
const pg_pool_t &get_pool() const override {
return pool.info;
}
+ eversion_t get_pg_committed_to() const override {
+ return recovery_state.get_pg_committed_to();
+ }
ObjectContextRef get_obc(
const hobject_t &hoid,
@@ -497,12 +514,12 @@ public:
const std::optional<pg_hit_set_history_t> &hset_history,
const eversion_t &trim_to,
const eversion_t &roll_forward_to,
- const eversion_t &min_last_complete_ondisk,
+ const eversion_t &pg_committed_to,
bool transaction_applied,
ObjectStore::Transaction &t,
bool async = false) override {
if (is_primary()) {
- ceph_assert(trim_to <= recovery_state.get_last_update_ondisk());
+ ceph_assert(trim_to <= pg_committed_to);
}
if (hset_history) {
recovery_state.update_hset(*hset_history);
@@ -519,7 +536,7 @@ public:
replica_clear_repop_obc(logv, t);
}
recovery_state.append_log(
- std::move(logv), trim_to, roll_forward_to, min_last_complete_ondisk,
+ std::move(logv), trim_to, roll_forward_to, pg_committed_to,
t, transaction_applied, async);
}
@@ -552,6 +569,10 @@ public:
recovery_state.update_last_complete_ondisk(lcod);
}
+ void update_pct(eversion_t pct) override {
+ recovery_state.update_pct(pct);
+ }
+
void update_stats(
const pg_stat_t &stat) override {
recovery_state.update_stats(
@@ -565,6 +586,8 @@ public:
GenContext<ThreadPool::TPHandle&> *c,
uint64_t cost) override;
+ common::intrusive_timer &get_pg_timer() override;
+
pg_shard_t whoami_shard() const override {
return pg_whoami;
}
@@ -580,6 +603,9 @@ public:
uint64_t min_upacting_features() const override {
return recovery_state.get_min_upacting_features();
}
+ pg_feature_vec_t get_pg_acting_features() const override {
+ return recovery_state.get_pg_acting_features();
+ }
void send_message_osd_cluster(
int peer, Message *m, epoch_t from_epoch) override {
osd->send_message_osd_cluster(peer, m, from_epoch);
@@ -596,6 +622,12 @@ public:
Message *m, const ConnectionRef& con) override {
osd->send_message_osd_cluster(m, con);
}
+ void start_mon_command(
+ const std::vector<std::string>& cmd, const bufferlist& inbl,
+ bufferlist *outbl, std::string *outs,
+ Context *onfinish) override {
+ osd->monc->start_mon_command(cmd, inbl, outbl, outs, onfinish);
+ }
ConnectionRef get_con_osd_cluster(int peer, epoch_t from_epoch) override;
entity_name_t get_cluster_msgr_name() override {
return osd->get_cluster_msgr_name();
@@ -1967,6 +1999,7 @@ public:
private:
DynamicPerfStats m_dynamic_perf_stats;
+
};
inline ostream& operator<<(ostream& out, const PrimaryLogPG::RepGather& repop)
@@ -1995,5 +2028,4 @@ inline ostream& operator<<(ostream& out,
void intrusive_ptr_add_ref(PrimaryLogPG::RepGather *repop);
void intrusive_ptr_release(PrimaryLogPG::RepGather *repop);
-
#endif