summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Farnum <greg@inktank.com>2013-09-10 14:59:09 -0700
committerGreg Farnum <greg@inktank.com>2013-09-10 16:15:03 -0700
commit14c71ea39bc5556c3890abcf4aee73fea4c27c87 (patch)
tree63ff049b36937a1b86907fe447c1134a00f41ffb
parent383d8a199ea70578bb418cf36812963b04c42873 (diff)
downloadceph-14c71ea39bc5556c3890abcf4aee73fea4c27c87.tar.gz
Objecter: rename cancel_op -> cancel_linger_op
This makes it possible to converse about op_cancel and cancel_linger_op without getting too confused. Signed-off-by: Greg Farnum <greg@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/osdc/Objecter.cc10
-rw-r--r--src/osdc/Objecter.h2
2 files changed, 5 insertions, 7 deletions
diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc
index bf380e60438..6c0486ce801 100644
--- a/src/osdc/Objecter.cc
+++ b/src/osdc/Objecter.cc
@@ -297,7 +297,7 @@ void Objecter::send_linger(LingerOp *info)
if (ops.count(info->register_tid)) {
Op *o = ops[info->register_tid];
op_cancel_map_check(o);
- cancel_op(o);
+ cancel_linger_op(o);
}
info->register_tid = _op_submit(o);
} else {
@@ -659,7 +659,7 @@ void Objecter::handle_osd_map(MOSDMap *m)
send_op(op);
}
} else {
- cancel_op(op);
+ cancel_linger_op(op);
}
}
for (list<LingerOp*>::iterator p = need_resend_linger.begin(); p != need_resend_linger.end(); ++p) {
@@ -1003,7 +1003,7 @@ void Objecter::kick_requests(OSDSession *session)
if (op->should_resend) {
resend[op->tid] = op;
} else {
- cancel_op(op);
+ cancel_linger_op(op);
}
}
while (!resend.empty()) {
@@ -1440,12 +1440,10 @@ bool Objecter::recalc_linger_op_target(LingerOp *linger_op)
return RECALC_OP_TARGET_NO_ACTION;
}
-void Objecter::cancel_op(Op *op)
+void Objecter::cancel_linger_op(Op *op)
{
ldout(cct, 15) << "cancel_op " << op->tid << dendl;
- // currently this only works for linger registrations, since we just
- // throw out the callbacks.
assert(!op->should_resend);
delete op->onack;
delete op->oncommit;
diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h
index 58d52405a90..880023ab37b 100644
--- a/src/osdc/Objecter.h
+++ b/src/osdc/Objecter.h
@@ -1187,7 +1187,7 @@ public:
map<epoch_t,list< pair<Context*, int> > > waiting_for_map;
void send_op(Op *op);
- void cancel_op(Op *op);
+ void cancel_linger_op(Op *op);
void finish_op(Op *op);
bool is_pg_changed(vector<int>& a, vector<int>& b, bool any_change=false);
enum recalc_op_target_result {