From: Greg Farnum Date: Mon, 24 Mar 2014 21:35:02 +0000 (-0700) Subject: OSD: rename gen_wq, schedule_work, and PG_QueueAsync to include "recovery" X-Git-Tag: v0.81~57^2~43 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dd3d023a74f76eaa1ff4cbf4b6b6aa6b1ceef61e;p=ceph.git OSD: rename gen_wq, schedule_work, and PG_QueueAsync to include "recovery" These all hook into the recovery thread pool and need to make that obvious. Signed-off-by: Greg Farnum --- diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index 3c27288c5325..3aae53bd6bc9 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -1091,7 +1091,7 @@ void ECBackend::filter_read_op( } if (op.in_progress.empty()) { - get_parent()->schedule_work( + get_parent()->schedule_recovery_work( get_parent()->bless_gencontext( new FinishReadOp(this, op.tid))); } diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 0ed88cb33c3b..1ab4fd26b630 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -188,7 +188,7 @@ OSDService::OSDService(OSD *osd) : scrub_wq(osd->scrub_wq), scrub_finalize_wq(osd->scrub_finalize_wq), rep_scrub_wq(osd->rep_scrub_wq), - gen_wq("gen_wq", cct->_conf->osd_recovery_thread_timeout, &osd->recovery_tp), + recovery_gen_wq("gen_wq", cct->_conf->osd_recovery_thread_timeout, &osd->recovery_tp), class_handler(osd->class_handler), publish_lock("OSDService::publish_lock"), pre_publish_lock("OSDService::pre_publish_lock"), diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 7b87d2ea262c..4f45f016ba13 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -328,7 +328,7 @@ public: ThreadPool::WorkQueue &scrub_wq; ThreadPool::WorkQueue &scrub_finalize_wq; ThreadPool::WorkQueue &rep_scrub_wq; - GenContextWQ gen_wq; + GenContextWQ recovery_gen_wq; ClassHandler *&class_handler; void dequeue_pg(PG *pg, list *dequeued); diff --git a/src/osd/PGBackend.h b/src/osd/PGBackend.h index e1e0423cc2e9..dd372612bebb 100644 --- a/src/osd/PGBackend.h +++ b/src/osd/PGBackend.h @@ -189,7 +189,7 @@ virtual void update_stats( const pg_stat_t &stat) = 0; - virtual void schedule_work( + virtual void schedule_recovery_work( GenContext *c) = 0; virtual pg_shard_t whoami_shard() const = 0; @@ -624,14 +624,14 @@ struct PG_SendMessageOnConn: public Context { } }; -struct PG_QueueAsync : public Context { +struct PG_RecoveryQueueAsync : public Context { PGBackend::Listener *pg; GenContext *c; - PG_QueueAsync( + PG_RecoveryQueueAsync( PGBackend::Listener *pg, GenContext *c) : pg(pg), c(c) {} void finish(int) { - pg->schedule_work(c); + pg->schedule_recovery_work(c); } }; diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc index 5a9668fc2a16..0763c7f740a5 100644 --- a/src/osd/ReplicatedBackend.cc +++ b/src/osd/ReplicatedBackend.cc @@ -254,14 +254,14 @@ void ReplicatedBackend::objects_read_async( int _r = store->read(coll, hoid, i->first.first, i->first.second, *(i->second.first)); if (i->second.second) { - get_parent()->schedule_work( + get_parent()->schedule_recovery_work( get_parent()->bless_gencontext( new AsyncReadCallback(_r, i->second.second))); } if (_r < 0) r = _r; } - get_parent()->schedule_work( + get_parent()->schedule_recovery_work( get_parent()->bless_gencontext( new AsyncReadCallback(r, on_complete))); } diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 68b14040f7ee..4d3415fc916f 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -333,10 +333,10 @@ void ReplicatedPG::begin_peer_recover( peer_missing[peer].revise_have(soid, eversion_t()); } -void ReplicatedPG::schedule_work( +void ReplicatedPG::schedule_recovery_work( GenContext *c) { - osd->gen_wq.queue(c); + osd->recovery_gen_wq.queue(c); } void ReplicatedPG::send_message_osd_cluster( @@ -2158,7 +2158,7 @@ void ReplicatedBackend::_do_pull_response(OpRequestRef op) m->get_priority()); c->to_continue.swap(to_continue); t->register_on_complete( - new PG_QueueAsync( + new PG_RecoveryQueueAsync( get_parent(), get_parent()->bless_gencontext(c))); } @@ -8938,7 +8938,7 @@ void ReplicatedBackend::sub_op_push(OpRequestRef op) op->get_req()->get_priority()); c->to_continue.swap(to_continue); t->register_on_complete( - new PG_QueueAsync( + new PG_RecoveryQueueAsync( get_parent(), get_parent()->bless_gencontext(c))); } diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 3ea47218aada..61fd55763ec5 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -388,7 +388,7 @@ public: info.stats = stat; } - void schedule_work( + void schedule_recovery_work( GenContext *c); pg_shard_t whoami_shard() const {