summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Zafman <david.zafman@inktank.com>2013-09-23 18:40:27 -0700
committerDavid Zafman <david.zafman@inktank.com>2013-09-26 11:29:05 -0700
commit55f4aa19142a58a6870f56f153acf67ba91132ee (patch)
treedd132d6cb895ea3a4f93685397af9b5cf0dc4c83
parent4a757eb8e0f3870e4aa29c1a255a268808e89cb2 (diff)
downloadceph-55f4aa19142a58a6870f56f153acf67ba91132ee.tar.gz
osd: Remove code for reading ancient unsupported logs
Signed-off-by: David Zafman <david.zafman@inktank.com>
-rw-r--r--src/osd/PGLog.cc31
1 files changed, 1 insertions, 30 deletions
diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc
index b95716f998e..6e025f289bc 100644
--- a/src/osd/PGLog.cc
+++ b/src/osd/PGLog.cc
@@ -782,10 +782,6 @@ void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid,
log.tail = info.log_tail;
- // In case of sobject_t based encoding, may need to list objects in the store
- // to find hashes
- vector<ghobject_t> ls;
-
if (ondisklog_head > 0) {
// read
bufferlist bl;
@@ -803,7 +799,6 @@ void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid,
assert(log.empty());
eversion_t last;
bool reorder = false;
- bool listed_collection = false;
while (!p.end()) {
uint64_t pos = ondisklog_tail + p.get_off();
@@ -846,31 +841,7 @@ void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid,
<< e.version << " after " << last << "\n";
}
- if (e.invalid_hash) {
- // We need to find the object in the store to get the hash
- if (!listed_collection) {
- store->collection_list(coll, ls);
- listed_collection = true;
- }
- bool found = false;
- for (vector<ghobject_t>::iterator i = ls.begin();
- i != ls.end();
- ++i) {
- // Older OSD can't have new format objects
- assert(i->generation == ghobject_t::NO_GEN);
- if (i->hobj.oid == e.soid.oid && i->hobj.snap == e.soid.snap) {
- e.soid = i->hobj;
- found = true;
- break;
- }
- }
- if (!found) {
- // Didn't find the correct hash
- std::ostringstream oss;
- oss << "Could not find hash for hoid " << e.soid << std::endl;
- throw read_log_error(oss.str().c_str());
- }
- }
+ assert(!e.invalid_hash);
if (e.invalid_pool) {
e.soid.pool = info.pgid.pool();