From: Sage Weil Date: Fri, 8 Feb 2013 07:13:11 +0000 (-0800) Subject: mon: retry PGStats message on EAGAIN X-Git-Tag: v0.57~29 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4837063d447afb45554f55bb6fde1c97559acd4b;p=ceph.git mon: retry PGStats message on EAGAIN If we get EAGAIN from a paxos restart/election/whatever, we should restart the message instead of just blindly acking it. Signed-off-by: Sage Weil Reviewed-by: Joao Luis --- diff --git a/src/mon/PGMonitor.h b/src/mon/PGMonitor.h index 2927c00453a6..5db1744111d5 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); } };