we need to notify the primary osd that a PG hosted by it has changed,
and it needs to start peering for it.
Signed-off-by: Kefu Chai <kchai@redhat.com>
}
}
+bool PG::should_send_notify() const
+{
+ return should_notify_primary && primary.osd >= 0;
+}
+
+pg_notify_t PG::get_notify(epoch_t query_epoch) const
+{
+ return pg_notify_t{primary.shard,
+ whoami.shard,
+ query_epoch,
+ get_osdmap_epoch(),
+ info};
+}
+
seastar::future<> PG::do_peering_event(std::unique_ptr<PGPeeringEvent> evt)
{
// todo
seastar::future<> read_state(ceph::os::CyanStore* store);
// peering/recovery
+ bool should_send_notify() const;
+ pg_notify_t get_notify(epoch_t query_epoch) const;
seastar::future<> do_peering_event(std::unique_ptr<PGPeeringEvent> evt);
seastar::future<> handle_advance_map(cached_map_t next_map);
seastar::future<> handle_activate_map();
epoch_t last_peering_reset = 0;
epoch_t need_up_thru = 0;
+ bool should_notify_primary = false;
// peer_info -- projected (updates _before_ replicas ack)
peer_info_t peer_info; //< info from peers (stray or prior)