summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-02-08 09:18:01 -0800
committerSage Weil <sage@inktank.com>2013-02-08 09:18:01 -0800
commit3322e96b7b56678eba7a35ba4fc29cda54d399ae (patch)
treef68a5e1f60c284251d2112d4f0f62b3a6cb83bc1
parent5a02d6de7e0a56913617533ba7cb222743f48469 (diff)
parent4837063d447afb45554f55bb6fde1c97559acd4b (diff)
downloadceph-3322e96b7b56678eba7a35ba4fc29cda54d399ae.tar.gz
Merge branch 'next'
-rw-r--r--src/mon/OSDMonitor.h30
-rw-r--r--src/mon/PGMonitor.h9
2 files changed, 20 insertions, 19 deletions
diff --git a/src/mon/OSDMonitor.h b/src/mon/OSDMonitor.h
index 9529f731c84..f53b6285abb 100644
--- a/src/mon/OSDMonitor.h
+++ b/src/mon/OSDMonitor.h
@@ -209,14 +209,10 @@ private:
C_Booted(OSDMonitor *cm, MOSDBoot *m_, bool l=true) :
cmon(cm), m(m_), logit(l) {}
void finish(int r) {
- if (r == -ECANCELED) {
- if (m)
- m->put();
- return;
- }
-
if (r >= 0)
cmon->_booted(m, logit);
+ else if (r == -ECANCELED)
+ m->put();
else
cmon->dispatch((PaxosServiceMessage*)m);
}
@@ -228,12 +224,13 @@ private:
epoch_t e;
C_ReplyMap(OSDMonitor *o, PaxosServiceMessage *mm, epoch_t ee) : osdmon(o), m(mm), e(ee) {}
void finish(int r) {
- if (r == -ECANCELED) {
- if (m)
- m->put();
- return;
+ if (r >= 0) {
+ osdmon->_reply_map(m, e);
+ } else if (r == -ECANCELED) {
+ m->put();
+ } else {
+ osdmon->dispatch(m);
}
- osdmon->_reply_map(m, e);
}
};
struct C_PoolOp : public Context {
@@ -248,12 +245,13 @@ private:
reply_data = *rd;
}
void finish(int r) {
- if (r == -ECANCELED) {
- if (m)
- m->put();
- return;
+ if (r >= 0) {
+ osdmon->_pool_op_reply(m, replyCode, epoch, &reply_data);
+ } else if (r == -ECANCELED) {
+ m->put();
+ } else {
+ osdmon->dispatch(m);
}
- osdmon->_pool_op_reply(m, replyCode, epoch, &reply_data);
}
};
diff --git a/src/mon/PGMonitor.h b/src/mon/PGMonitor.h
index 2927c00453a..5db1744111d 100644
--- a/src/mon/PGMonitor.h
+++ b/src/mon/PGMonitor.h
@@ -71,12 +71,15 @@ private:
entity_inst_t who;
C_Stats(PGMonitor *p, MPGStats *r, MPGStatsAck *a) : pgmon(p), req(r), ack(a) {}
void finish(int r) {
- if (r == -ECANCELED) {
+ if (r >= 0) {
+ pgmon->_updated_stats(req, ack);
+ } else if (r == -ECANCELED) {
req->put();
ack->put();
- return;
+ } else {
+ ack->put();
+ dispatch(req);
}
- pgmon->_updated_stats(req, ack);
}
};