From b1de913188add3bf5097790aaf707384557e51cb Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 24 Oct 2011 21:46:56 -0700 Subject: [PATCH] osd: drop ability to disable op queue entirely This is pretty useless, and broken wrt requeueing anyway. Signed-off-by: Sage Weil --- src/osd/OSD.cc | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 7486a5332e8d6..b4d171118f922 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -5300,12 +5300,7 @@ void OSD::_handle_op(PG *pg, MOSDOp *op) } } - if (g_conf->osd_op_threads < 1) { - pg->do_op(op); - } else { - // queue for worker threads - enqueue_op(pg, op); - } + enqueue_op(pg, op); } @@ -5346,6 +5341,9 @@ void OSD::handle_sub_op(MOSDSubOp *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; @@ -5361,11 +5359,7 @@ void OSD::_handle_sub_op(PG *pg, MOSDSubOp *op) 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) @@ -5403,15 +5397,14 @@ 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 } -- 2.39.5