]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd_types::is_new_interval: size change triggers new interval
authorSamuel Just <sjust@redhat.com>
Tue, 26 May 2015 19:35:11 +0000 (12:35 -0700)
committerJosh Durgin <jdurgin@redhat.com>
Thu, 27 Aug 2015 22:25:52 +0000 (15:25 -0700)
Fixes: 11771
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit ff79959c037a7145f7104b06d9e6a64492fdb95f)

src/osd/osd_types.cc
src/osd/osd_types.h
src/osdc/Objecter.cc
src/osdc/Objecter.h

index 37744529acc1dc69212e026c5711adde7210f5bc..f039e2db7e4fad67e043612496172ee38ac0eef9 100644 (file)
@@ -2547,6 +2547,8 @@ bool pg_interval_t::is_new_interval(
   int new_up_primary,
   const vector<int> &old_up,
   const vector<int> &new_up,
+  int old_size,
+  int new_size,
   int old_min_size,
   int new_min_size,
   unsigned old_pg_num,
@@ -2557,6 +2559,7 @@ bool pg_interval_t::is_new_interval(
     old_up_primary != new_up_primary ||
     new_up != old_up ||
     old_min_size != new_min_size ||
+    old_size != new_size ||
     pgid.is_split(old_pg_num, new_pg_num, 0);
 }
 
@@ -2581,6 +2584,8 @@ bool pg_interval_t::is_new_interval(
                    new_up_primary,
                    old_up,
                    new_up,
+                   lastmap->get_pools().find(pgid.pool())->second.size,
+                   osdmap->get_pools().find(pgid.pool())->second.size,
                    lastmap->get_pools().find(pgid.pool())->second.min_size,
                    osdmap->get_pools().find(pgid.pool())->second.min_size,
                    lastmap->get_pg_num(pgid.pool()),
index 6525a0cf686b9bc4d9369b5bd2a1241329bcd1f4..a2830488de07a7e9d72f04627ffe1f8d02121b61 100644 (file)
@@ -1845,6 +1845,8 @@ struct pg_interval_t {
     int new_up_primary,
     const vector<int> &old_up,
     const vector<int> &new_up,
+    int old_size,
+    int new_size,
     int old_min_size,
     int new_min_size,
     unsigned old_pg_num,
index 6818febe7c0426e1bb0c1199ad177eb6519555de..eb0c24b0c42308ee7ceece36f9dc23f3a730327b 100644 (file)
@@ -2428,6 +2428,7 @@ int Objecter::_calc_target(op_target_t *t, epoch_t *last_force_resend,  bool any
     }
   }
 
+  int size = pi->size;
   int min_size = pi->min_size;
   unsigned pg_num = pi->get_pg_num();
   int up_primary, acting_primary;
@@ -2443,6 +2444,8 @@ int Objecter::_calc_target(op_target_t *t, epoch_t *last_force_resend,  bool any
          up_primary,
          t->up,
          up,
+         t->size,
+         size,
          t->min_size,
          min_size,
          t->pg_num,
@@ -2469,6 +2472,7 @@ int Objecter::_calc_target(op_target_t *t, epoch_t *last_force_resend,  bool any
     t->acting_primary = acting_primary;
     t->up_primary = up_primary;
     t->up = up;
+    t->size = size;
     t->min_size = min_size;
     t->pg_num = pg_num;
     ldout(cct, 10) << __func__ << " "
index 3466d4324fb920407af5b488fd66df5bb7a4f7de..08bfcfce2f652c2a0c3aa16997ba29515dab47e6 100644 (file)
@@ -1122,6 +1122,7 @@ public:
     vector<int> acting;  ///< set of acting osds for last pg we mapped to
     int up_primary;      ///< primary for last pg we mapped to based on the up set
     int acting_primary;  ///< primary for last pg we mapped to based on the acting set
+    int size;        ///< the size of the pool when were were last mapped
     int min_size;        ///< the min size of the pool when were were last mapped
 
     bool used_replica;
@@ -1137,6 +1138,7 @@ public:
        pg_num(0),
        up_primary(-1),
        acting_primary(-1),
+       size(-1),
        min_size(-1),
        used_replica(false),
        paused(false),