]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: kill unused PG::Log::copy_after_unless_divergent
authorSage Weil <sage.weil@dreamhost.com>
Sat, 3 Dec 2011 22:29:15 +0000 (14:29 -0800)
committerSamuel Just <samuel.just@dreamhost.com>
Wed, 14 Dec 2011 19:31:33 +0000 (11:31 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/PG.cc
src/osd/PG.h

index d03930989594592cbd7a084f1cd7c8f42444c66a..7b46e7b4ed3fef7f2e2bf243436f5860b82ac03b 100644 (file)
@@ -88,47 +88,6 @@ void PG::Log::copy_after(const Log &other, eversion_t v)
   }
 }
 
-bool PG::Log::copy_after_unless_divergent(const Log &other, eversion_t split, eversion_t floor) 
-{
-  assert(split >= other.tail);
-  assert(floor >= other.tail);
-  assert(floor <= split);
-  head = tail = other.head;
-  
-  /* runs on replica.  split is primary's log.head.  floor is how much they want.
-     split tell us if the primary is divergent.. e.g.:
-     -> i am A, B is primary, split is 2'6, floor is 2'2.
-A     B     C
-2'2         2'2
-2'3   2'3   2'3
-2'4   2'4   2'4
-3'5 | 2'5   2'5
-3'6 | 2'6
-3'7 |
-3'8 |
-3'9 |
-      -> i need to backfill.
-  */
-
-  for (list<Entry>::const_reverse_iterator i = other.log.rbegin();
-       i != other.log.rend();
-       i++) {
-    // is primary divergent? 
-    // e.g. my 3'6 vs their 2'6 split
-    if (i->version.version == split.version && i->version.epoch > split.epoch) {
-      clear();
-      return false;   // divergent!
-    }
-    if (i->version == floor) break;
-    assert(i->version > floor);
-
-    // e.g. my 2'23 > '12
-    log.push_front(*i);
-  }
-  tail = floor;
-  return true;
-}
-
 void PG::IndexedLog::trim(ObjectStore::Transaction& t, eversion_t s) 
 {
   if (complete_to != log.end() &&
index 5f863eb418fa84fbbfea2b3c4542cd9a4d8e028e..7e957c347d7e51dda3647effb5f1bdf23c46910a 100644 (file)
@@ -528,7 +528,6 @@ public:
     }
 
     void copy_after(const Log &other, eversion_t v);
-    bool copy_after_unless_divergent(const Log &other, eversion_t split, eversion_t floor);
     ostream& print(ostream& out) const;
   };
   WRITE_CLASS_ENCODER(Log)