]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Objecter::_recalc_linger_op: resend for any acting set change 2453/head
authorSamuel Just <sam.just@inktank.com>
Tue, 9 Sep 2014 19:58:07 +0000 (12:58 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 9 Sep 2014 19:58:07 +0000 (12:58 -0700)
Fixes: #9220
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osdc/Objecter.cc
src/osdc/Objecter.h

index e77ea89fca873fe8f0db098cfd1b461f2ab2cd8d..1309a915ffd46134322de2c2ff3d404e09237a2a 100644 (file)
@@ -1975,7 +1975,7 @@ int64_t Objecter::get_object_pg_hash_position(int64_t pool, const string& key,
   return p->raw_hash_to_pg(p->hash_key(key, ns));
 }
 
-int Objecter::_calc_target(op_target_t *t)
+int Objecter::_calc_target(op_target_t *t, bool any_change)
 {
   assert(rwlock.is_locked());
 
@@ -2036,7 +2036,8 @@ int Objecter::_calc_target(op_target_t *t)
   }
 
   if (t->pgid != pgid ||
-      is_pg_changed(t->primary, t->acting, primary, acting, t->used_replica) ||
+      is_pg_changed(
+       t->primary, t->acting, primary, acting, t->used_replica || any_change) ||
       force_resend) {
     t->pgid = pgid;
     t->acting = acting;
@@ -2234,7 +2235,7 @@ int Objecter::_recalc_linger_op_target(LingerOp *linger_op, RWLock::Context& lc)
 {
   assert(rwlock.is_wlocked());
 
-  int r = _calc_target(&linger_op->target);
+  int r = _calc_target(&linger_op->target, true);
   if (r == RECALC_OP_TARGET_NEED_RESEND) {
     ldout(cct, 10) << "recalc_linger_op_target tid " << linger_op->linger_id
                   << " pgid " << linger_op->target.pgid
index 8594f870b83d5766bbbc6eea00575807affe448d..342dda5e3cc05f173615b997754bb94633538daf 100644 (file)
@@ -1513,7 +1513,7 @@ public:
   bool osdmap_full_flag() const;
 
   bool target_should_be_paused(op_target_t *op);
-  int _calc_target(op_target_t *t);
+  int _calc_target(op_target_t *t, bool any_change=false);
   int _map_session(op_target_t *op, OSDSession **s,
                   RWLock::Context& lc);