]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Get pgid ancestor from last_map when building past intervals 3866/head
authorDavid Zafman <dzafman@redhat.com>
Thu, 9 Oct 2014 18:20:13 +0000 (11:20 -0700)
committerDavid Zafman <dzafman@redhat.com>
Tue, 3 Mar 2015 19:21:00 +0000 (11:21 -0800)
Fixed OSD::build_past_intervals_parallel() and PG::generate_past_intervals()

Fixes: #10430
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 0c5b66da7a9ba516340d06d9e806beb9d1040d0e)

Conflicts:
src/osd/OSD.cc

src/osd/OSD.cc
src/osd/PG.cc

index 5fe37310c203d0485eec00aaaa1f47f32e8441ec..4fa080b4759df8fa575928a0c44e243f6880c7db 100644 (file)
@@ -2255,8 +2255,11 @@ void OSD::build_past_intervals_parallel()
       vector<int> acting, up;
       int up_primary;
       int primary;
+      pg_t pgid = pg->info.pgid.pgid;
+      if (p.same_interval_since && last_map->get_pools().count(pgid.pool()))
+       pgid = pgid.get_ancestor(last_map->get_pg_num(pgid.pool()));
       cur_map->pg_to_up_acting_osds(
-       pg->info.pgid.pgid, &up, &up_primary, &acting, &primary);
+       pgid, &up, &up_primary, &acting, &primary);
 
       if (p.same_interval_since == 0) {
        dout(10) << __func__ << " epoch " << cur_epoch << " pg " << pg->info.pgid
@@ -2283,7 +2286,7 @@ void OSD::build_past_intervals_parallel()
        pg->info.history.last_epoch_clean,
        cur_map, last_map,
        pg->info.pgid.pool(),
-       pg->info.pgid.pgid,
+       pgid,
        &pg->past_intervals,
        &debug);
       if (new_interval) {
index 4ea71295f763f295837ee519bfd41c993e8b3eb5..5eec0e14108bacb9cb87aae7bf7b9275495be257 100644 (file)
@@ -660,8 +660,8 @@ void PG::generate_past_intervals()
 
     cur_map = osd->get_map(cur_epoch);
     pg_t pgid = get_pgid().pgid;
-    if (cur_map->get_pools().count(pgid.pool()))
-      pgid = pgid.get_ancestor(cur_map->get_pg_num(pgid.pool()));
+    if (last_map->get_pools().count(pgid.pool()))
+      pgid = pgid.get_ancestor(last_map->get_pg_num(pgid.pool()));
     cur_map->pg_to_up_acting_osds(pgid, &up, &up_primary, &acting, &primary);
 
     std::stringstream debug;