]> git.apps.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>
Mon, 31 Aug 2015 19:26:25 +0000 (12:26 -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 ca981a09d71ed0151c4dd23868d1736445ea9f6e..75aa074970610a5fd61d5fbf967ce1cbe5303a23 100644 (file)
@@ -2205,6 +2205,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,
@@ -2215,6 +2217,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);
 }
 
@@ -2240,6 +2243,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 115b72281e3f5ad05ef4b2544c9983c21a9a5f98..38e1e12397fa5703af0b51619208febcc8751dca 100644 (file)
@@ -1764,6 +1764,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 fcf211f71a243bd036fc9bc3083a93adc3b52bb7..1d81d120593c87b23473b916d6febbda136ef866 100644 (file)
@@ -1490,6 +1490,7 @@ int Objecter::calc_target(op_target_t *t, epoch_t *last_force_resend, bool any_c
       return RECALC_OP_TARGET_POOL_DNE;
   }
 
+  int size = pi->size;
   int min_size = pi->min_size;
   unsigned pg_num = pi->get_pg_num();
   int up_primary, acting_primary;
@@ -1505,6 +1506,8 @@ int Objecter::calc_target(op_target_t *t, epoch_t *last_force_resend, bool any_c
          up_primary,
          t->up,
          up,
+         t->size,
+         size,
          t->min_size,
          min_size,
          t->pg_num,
@@ -1531,6 +1534,7 @@ int Objecter::calc_target(op_target_t *t, epoch_t *last_force_resend, bool any_c
     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 db60095644ed30dfae8eb5f44de02f4af4bda55c..8cd2e6c8af80233636bebc444115e310bcf28460 100644 (file)
@@ -1077,6 +1077,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;
@@ -1092,6 +1093,7 @@ public:
        pg_num(0),
        up_primary(-1),
        acting_primary(-1),
+       size(-1),
        min_size(-1),
        used_replica(false),
        paused(false),