}
}
- if (g_conf->osd_op_threads < 1) {
- pg->do_op(op);
- } else {
- // queue for worker threads
- enqueue_op(pg, op);
- }
+ enqueue_op(pg, op);
}
pg->put();
}
+/*
+ * queue an operation, or discard it. avoid side-effects or any "real" work.
+ */
void OSD::_handle_sub_op(PG *pg, MOSDSubOp *op)
{
dout(10) << *pg << " _handle_sub_op " << op << " " << *op << dendl;
return;
}
- if (g_conf->osd_op_threads < 1) {
- pg->do_sub_op(op); // do it now
- } else {
- enqueue_op(pg, op); // queue for worker threads
- }
+ enqueue_op(pg, op); // queue for worker threads
}
void OSD::handle_sub_op_reply(MOSDSubOpReply *op)
pg->put();
}
+/*
+ * queue an operation, or discard it. avoid side-effects or any "real" work.
+ */
void OSD::_handle_sub_op_reply(PG *pg, MOSDSubOpReply *op)
{
dout(10) << *pg << " _handle_sub_op_reply " << op << " " << *op << dendl;
assert(pg->is_locked());
- if (g_conf->osd_op_threads < 1) {
- pg->do_sub_op_reply(op); // do it now
- } else {
- enqueue_op(pg, op); // queue for worker threads
- }
+ enqueue_op(pg, op); // queue for worker threads
}