]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: merge history when primary sends replica new pg info
authorSage Weil <sage.weil@dreamhost.com>
Fri, 20 May 2011 22:04:09 +0000 (15:04 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 20 May 2011 22:15:12 +0000 (15:15 -0700)
This, among other things, lets us update last_epoch_started and
last_epoch_clean.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/PG.cc

index 812f6baa21add6f2db163e35481de6320c5ec5d6..27e85f82227b361b0bfa27c324ba1157ddb6911f 100644 (file)
@@ -3644,6 +3644,10 @@ void PG::proc_primary_info(ObjectStore::Transaction &t, const Info &oinfo)
   assert(is_active());
   info.stats = oinfo.stats;
 
+  osd->unreg_last_pg_scrub(info.pgid, info.history.last_scrub_stamp);
+  info.history.merge(oinfo.history);
+  osd->reg_last_pg_scrub(info.pgid, info.history.last_scrub_stamp);
+
   // Handle changes to purged_snaps
   interval_set<snapid_t> p;
   p.union_of(oinfo.purged_snaps, info.purged_snaps);