]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd_types::is_new_interval: size change triggers new interval 4804/head
authorSamuel Just <sjust@redhat.com>
Tue, 26 May 2015 19:35:11 +0000 (12:35 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 26 May 2015 19:58:07 +0000 (12:58 -0700)
Fixes: 11771
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/osd_types.cc
src/osd/osd_types.h
src/osdc/Objecter.cc
src/osdc/Objecter.h

index a73b46fbffd8bfc5bc713e6cf2f7937f6ca687fe..1e620d5009b2afefb30767a1c7a86056bfe580cc 100644 (file)
@@ -2545,6 +2545,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,
@@ -2555,6 +2557,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);
 }
 
@@ -2579,6 +2582,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 18f5402501966d1233676b4c25258001a4ded4ee..f1624335b8887c5590c467a8d5b03923ee4fe992 100644 (file)
@@ -1846,6 +1846,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 4987a92d75c5bb52f97264ba159503a5823ac12a..d1d76cba5229dbb3aecb90ee8da1aa6f7824ad1e 100644 (file)
@@ -2458,6 +2458,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;
@@ -2473,6 +2474,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,
@@ -2499,6 +2502,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 478c16661b45a994444ee628d303a4253e9a62e9..4124a533b2f76b93de91bd869aacfd2336a768f2 100644 (file)
@@ -1126,6 +1126,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;
@@ -1141,6 +1142,7 @@ public:
        pg_num(0),
        up_primary(-1),
        acting_primary(-1),
+       size(-1),
        min_size(-1),
        used_replica(false),
        paused(false),