From: Josh Durgin Date: Fri, 22 Feb 2013 07:31:21 +0000 (-0800) Subject: objecter: don't resend linger ops unnecessarily X-Git-Tag: v0.59~145^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3105034067dd4afba6ebaa9e30c6782854c9d1ad;p=ceph.git objecter: don't resend linger ops unnecessarily recalc_linger_op_target() was checking and then setting linger_op->pgid and linger_op->active, but these were only set by recalc_linger_op_target(). This was only called by handle_osd_map(), so the first osdmap after a watch was established would cause a resend of the watch. Analogous to the normal Op, set this information by calling recalc_linger_op_target in send_linger(). Signed-off-by: Josh Durgin --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 2cb6e555e774..4bd34b5ef325 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -287,6 +287,9 @@ void Objecter::send_linger(LingerOp *info) info->register_tid = _op_submit(o); } else { // first send + // populate info->pgid and info->acting so we + // don't resend the linger op on the next osdmap update + recalc_linger_op_target(info); info->register_tid = op_submit(o); }