state(0),
send_notify(false),
need_up_thru(false),
- need_flush(false),
last_peering_reset(0),
heartbeat_peer_lock("PG::heartbeat_peer_lock"),
backfill_target(-1),
publish_stats_to_osd();
}
- // we need to flush this all out before doing anything else..
- need_flush = true;
-
// waiters
if (!is_replay()) {
requeue_ops(waiting_for_active);
on_activate();
}
-void PG::do_pending_flush()
-{
- assert(is_locked());
- if (need_flush) {
- dout(10) << "do_pending_flush doing pending flush" << dendl;
- osr->flush();
- need_flush = false;
- dout(10) << "do_pending_flush done" << dendl;
- }
-}
-
bool PG::op_has_sufficient_caps(OpRequestRef op)
{
// only check MOSDOp
*context< RecoveryMachine >().get_on_safe_context_list(),
*context< RecoveryMachine >().get_query_map(),
context< RecoveryMachine >().get_info_map());
+ pg->start_flush(
+ context< RecoveryMachine >().get_cur_transaction(),
+ context< RecoveryMachine >().get_on_applied_context_list(),
+ context< RecoveryMachine >().get_on_safe_context_list());
assert(pg->is_active());
dout(10) << "Activate Finished" << dendl;
}
// primary-only, recovery-only state
set<int> might_have_unfound; // These osds might have objects on them
// which are unfound on the primary
- bool need_flush; // need to flush before any new activity
-
epoch_t last_peering_reset;
OpRequestRef op,
ThreadPool::TPHandle &handle)
{
- // do any pending flush
- do_pending_flush();
-
if (!op_has_sufficient_caps(op)) {
osd->reply_op_error(op, -EPERM);
return;