Skip to content
Permalink
Browse files

osd_types::is_new_interval: size change triggers new interval

Fixes: 11771
Signed-off-by: Samuel Just <sjust@redhat.com>
  • Loading branch information...
athanatos committed May 26, 2015
1 parent bf0bdbc commit ff79959c037a7145f7104b06d9e6a64492fdb95f
Showing with 13 additions and 0 deletions.
  1. +5 −0 src/osd/osd_types.cc
  2. +2 −0 src/osd/osd_types.h
  3. +4 −0 src/osdc/Objecter.cc
  4. +2 −0 src/osdc/Objecter.h
@@ -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()),
@@ -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,
@@ -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__ << " "
@@ -1126,6 +1126,7 @@ class Objecter : public md_config_obs_t, public Dispatcher {
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 @@ class Objecter : public md_config_obs_t, public Dispatcher {
pg_num(0),
up_primary(-1),
acting_primary(-1),
size(-1),
min_size(-1),
used_replica(false),
paused(false),

0 comments on commit ff79959

Please sign in to comment.
You can’t perform that action at this time.