From 78b64473ce8053369941fbb3d13f169113ab069a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 2 Dec 2011 13:58:14 -0800 Subject: [PATCH] osd: kill PG::Log::copy_non_backlog Signed-off-by: Sage Weil --- src/osd/PG.cc | 21 +-------------------- src/osd/PG.h | 1 - 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 5607c4df5964c..0f55cb03f0c7b 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -132,25 +132,6 @@ A B C return true; } -void PG::Log::copy_non_backlog(const Log &other) -{ - if (other.backlog) { - head = other.head; - tail = other.tail; - for (list::const_reverse_iterator i = other.log.rbegin(); - i != other.log.rend(); - i++) - if (i->version > tail) - log.push_front(*i); - else - break; - } else { - *this = other; - } -} - - - void PG::IndexedLog::trim(ObjectStore::Transaction& t, eversion_t s) { if (backlog && s < tail) @@ -3191,7 +3172,7 @@ void PG::fulfill_log(int from, const Query &query, epoch_t query_epoch) } else if (query.type == PG::Query::FULLLOG) { dout(10) << " sending info+missing+full log" << dendl; - mlog->log.copy_non_backlog(log); + mlog->log = log; } dout(10) << " sending " << mlog->log << " " << mlog->missing << dendl; diff --git a/src/osd/PG.h b/src/osd/PG.h index a3f365b8ba45b..73da9c75ef499 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -539,7 +539,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); - void copy_non_backlog(const Log &other); ostream& print(ostream& out) const; }; WRITE_CLASS_ENCODER(Log) -- 2.39.5