summaryrefslogtreecommitdiff
path: root/src/osd/OSD.h
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-05-09 12:20:24 -0700
committerSamuel Just <sam.just@inktank.com>2013-05-09 12:20:24 -0700
commit69b64826b762f713d88072a5c3a3e54fa1e0995b (patch)
treed9a9b282ae9eceefcae9909d3bc8bc3d814690b2 /src/osd/OSD.h
parentfd63f8aa30c0cad0ad2cc382971d3f6842ae53cd (diff)
downloadceph-69b64826b762f713d88072a5c3a3e54fa1e0995b.tar.gz
OSD: don't rename pg collections, handle PGs in RemoveWQ
Signed-off-by: Samuel Just <sam.just@inktank.com>
Diffstat (limited to 'src/osd/OSD.h')
-rw-r--r--src/osd/OSD.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/osd/OSD.h b/src/osd/OSD.h
index f52973456f6..e5886d959af 100644
--- a/src/osd/OSD.h
+++ b/src/osd/OSD.h
@@ -1451,36 +1451,36 @@ protected:
} rep_scrub_wq;
// -- removing --
- struct RemoveWQ : public ThreadPool::WorkQueue<boost::tuple<coll_t, SequencerRef, DeletingStateRef> > {
+ struct RemoveWQ :
+ public ThreadPool::WorkQueueVal<pair<PGRef, DeletingStateRef> > {
ObjectStore *&store;
- list<boost::tuple<coll_t, SequencerRef, DeletingStateRef> *> remove_queue;
+ list<pair<PGRef, DeletingStateRef> > remove_queue;
RemoveWQ(ObjectStore *&o, time_t ti, ThreadPool *tp)
- : ThreadPool::WorkQueue<boost::tuple<coll_t, SequencerRef, DeletingStateRef> >("OSD::RemoveWQ", ti, 0, tp),
+ : ThreadPool::WorkQueueVal<pair<PGRef, DeletingStateRef> >(
+ "OSD::RemoveWQ", ti, 0, tp),
store(o) {}
bool _empty() {
return remove_queue.empty();
}
- bool _enqueue(boost::tuple<coll_t, SequencerRef, DeletingStateRef> *item) {
+ void _enqueue(pair<PGRef, DeletingStateRef> item) {
remove_queue.push_back(item);
- return true;
}
- void _dequeue(boost::tuple<coll_t, SequencerRef, DeletingStateRef> *item) {
+ void _enqueue_front(pair<PGRef, DeletingStateRef> item) {
+ remove_queue.push_front(item);
+ }
+ bool _dequeue(pair<PGRef, DeletingStateRef> item) {
assert(0);
}
- boost::tuple<coll_t, SequencerRef, DeletingStateRef> *_dequeue() {
- if (remove_queue.empty())
- return NULL;
- boost::tuple<coll_t, SequencerRef, DeletingStateRef> *item = remove_queue.front();
+ pair<PGRef, DeletingStateRef> _dequeue() {
+ assert(!remove_queue.empty());
+ pair<PGRef, DeletingStateRef> item = remove_queue.front();
remove_queue.pop_front();
return item;
}
- void _process(boost::tuple<coll_t, SequencerRef, DeletingStateRef> *item);
+ void _process(pair<PGRef, DeletingStateRef>);
void _clear() {
- while (!remove_queue.empty()) {
- delete remove_queue.front();
- remove_queue.pop_front();
- }
+ remove_queue.clear();
}
} remove_wq;
uint64_t next_removal_seq;