delete op;
}
-
void OSD::handle_op(MOSDOp *op)
{
- // throttle? FIXME PROBABLY!
- while (pending_ops > g_conf.osd_max_opq) {
- dout(10) << "enqueue_op waiting for pending_ops " << pending_ops
- << " to drop to " << g_conf.osd_max_opq << dendl;
- op_queue_cond.Wait(osd_lock);
- }
-
// require same or newer map
if (!require_same_or_newer_map(op, op->get_map_epoch()))
return;
// share our map with sender, if they're old
_share_map_incoming(op->get_source_inst(), op->get_map_epoch());
+ throttle_op_queue();
// calc actual pgid
pg_t pgid = osdmap->raw_pg_to_pg(op->get_pg());
return;
}
+ throttle_op_queue();
+
PG *pg = _lookup_lock_pg(pgid);
// same pg?
+void OSD::throttle_op_queue()
+{
+ // throttle? FIXME PROBABLY!
+ while (pending_ops > g_conf.osd_max_opq) {
+ dout(10) << "enqueue_op waiting for pending_ops " << pending_ops
+ << " to drop to " << g_conf.osd_max_opq << dendl;
+ op_queue_cond.Wait(osd_lock);
+ }
+}
+
void OSD::wait_for_no_ops()
{
if (pending_ops > 0) {
Cond op_queue_cond;
void wait_for_no_ops();
-
+ void throttle_op_queue();
void enqueue_op(PG *pg, Message *op);
void dequeue_op(PG *pg);
static void static_dequeueop(OSD *o, PG *pg) {