]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Objecter::_recalc_linger_op: resend for any acting set change
authorSamuel Just <sam.just@inktank.com>
Tue, 9 Sep 2014 19:58:07 +0000 (12:58 -0700)
committerSage Weil <sage@redhat.com>
Fri, 12 Sep 2014 17:51:42 +0000 (10:51 -0700)
Fixes: #9220
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 1349383ac416673cb6df2438729fd2182876a7d1)

Conflicts:

src/osdc/Objecter.cc
src/osdc/Objecter.h

src/osdc/Objecter.cc
src/osdc/Objecter.h

index a348ccde08dd97d160dfacd7ef441321a70335d1..d82b3e12902ec0cc11dd161e803af5a241ecbc21 100644 (file)
@@ -1439,7 +1439,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)
 {
   bool is_read = t->flags & CEPH_OSD_FLAG_READ;
   bool is_write = t->flags & CEPH_OSD_FLAG_WRITE;
@@ -1496,7 +1496,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;
@@ -1575,7 +1576,7 @@ int Objecter::recalc_op_target(Op *op)
 
 bool Objecter::recalc_linger_op_target(LingerOp *linger_op)
 {
-  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 1e6fcf34b565286579d2fdd1527071fe178b645c..2ede888a948cd47443872d6d7a8517793ed8e89d 100644 (file)
@@ -1480,7 +1480,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 recalc_op_target(Op *op);
   bool recalc_linger_op_target(LingerOp *op);