summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Durgin <josh.durgin@inktank.com>2013-08-21 14:28:49 -0700
committerJosh Durgin <josh.durgin@inktank.com>2013-08-21 16:31:56 -0700
commit8551be345c86837e0893fdf6c9c5b0af523f50f8 (patch)
tree3bc12e6b2d5e91d332aa886a6f3d1eaf1dfc80d2
parent1670a73b56e0b407b65334d8f03d3ebb9558ac8b (diff)
downloadceph-8551be345c86837e0893fdf6c9c5b0af523f50f8.tar.gz
objecter: resend unfinished lingers when osdmap is no longer paused
Plain Ops that haven't finished yet need to be resent if the osdmap transitions from full or paused to unpaused. If these Ops are triggered by LingerOps, they will be cancelled instead (since should_resend = false), but the LingerOps that triggered them will not be resent. Fix this by checking the registered flag for all linger ops, and resending any of them that aren't paused anymore. Fixes: #6070 Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Reviewed-by: Sage Weil <sage.weil@inktank.com> (cherry picked from commit 38a0ca66a79af4b541e6322467ae3a8a4483cc72)
-rw-r--r--src/osdc/Objecter.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc
index 7ae2e779b88..cd80e8abc85 100644
--- a/src/osdc/Objecter.cc
+++ b/src/osdc/Objecter.cc
@@ -580,10 +580,10 @@ void Objecter::handle_osd_map(MOSDMap *m)
// was/is paused?
if (was_pauserd || was_pausewr || pauserd || pausewr)
maybe_request_map();
-
+
// unpause requests?
if ((was_pauserd && !pauserd) ||
- (was_pausewr && !pausewr))
+ (was_pausewr && !pausewr)) {
for (map<tid_t,Op*>::iterator p = ops.begin();
p != ops.end();
p++) {
@@ -593,6 +593,16 @@ void Objecter::handle_osd_map(MOSDMap *m)
!((op->flags & CEPH_OSD_FLAG_WRITE) && pausewr)) // not still paused as a write
need_resend[op->tid] = op;
}
+ for (map<tid_t, LingerOp*>::iterator lp = linger_ops.begin();
+ lp != linger_ops.end();
+ ++lp) {
+ LingerOp *op = lp->second;
+ if (!op->registered &&
+ !pauserd && // not still paused as a read
+ !((op->flags & CEPH_OSD_FLAG_WRITE) && pausewr)) // not still paused as a write
+ need_resend_linger.push_back(op);
+ }
+ }
// resend requests
for (map<tid_t, Op*>::iterator p = need_resend.begin(); p != need_resend.end(); p++) {