]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: fix generate_past_intervals 7917/head
authorSage Weil <sage@redhat.com>
Tue, 6 Oct 2015 18:35:35 +0000 (14:35 -0400)
committerDavid Zafman <dzafman@redhat.com>
Fri, 18 Mar 2016 16:45:02 +0000 (09:45 -0700)
We may be only calculating older past intervals and have a valid
history.same_interval_since value, in which case the local
same_interval_since value will end at the newest old interval we had to
generate.

This was introduced by 70316541bbb115d9a35954bfba373cf1dc084b7e.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 98cbf0380e9ee848725fc87d61c31a734305a84f)

src/osd/PG.cc

index b53c125693e36da420d87e9b7608c04ae4fa457d..7917638b1e7248def5725e0247ce973e03f8aff5 100644 (file)
@@ -749,10 +749,8 @@ void PG::generate_past_intervals()
     }
   }
 
-  // Verify same_interval_since is correct
-  if (info.history.same_interval_since) {
-    assert(info.history.same_interval_since == same_interval_since);
-  } else {
+  // PG import needs recalculated same_interval_since
+  if (info.history.same_interval_since == 0) {
     assert(same_interval_since);
     dout(10) << __func__ << " fix same_interval_since " << same_interval_since << " pg " << *this << dendl;
     dout(10) << __func__ << " past_intervals " << past_intervals << dendl;