]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix osdmap trimming unsigned overflow
authorSage Weil <sage@newdream.net>
Thu, 6 Oct 2011 23:00:34 +0000 (16:00 -0700)
committerSage Weil <sage@newdream.net>
Thu, 6 Oct 2011 23:17:14 +0000 (16:17 -0700)
This was trimming way to aggressively for early epochs due to the unsigned
version overflowing.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/OSDMonitor.cc

index 3af27eb2421449f4c540527012862c7b6e674555..a25235bae9d12831cd34229137b9e3013fc6da29 100644 (file)
@@ -1113,7 +1113,8 @@ void OSDMonitor::tick()
       mon->pgmon()->pg_map.creating_pgs.empty()) {
     epoch_t floor = mon->pgmon()->pg_map.calc_min_last_epoch_clean();
     dout(10) << " min_last_epoch_clean " << floor << dendl;
-    if (floor < paxos->get_version() - 10) {
+    unsigned min = 100;
+    if (floor + min < paxos->get_version()) {
       epoch_t of = paxos->get_first_committed();
       paxos->trim_to(floor);
       while (of < floor) {