diff options
author | Igor Podoski <igor.podoski@ts.fujitsu.com> | 2015-12-18 13:26:43 +0100 |
---|---|---|
committer | Igor Podoski <igor.podoski@ts.fujitsu.com> | 2015-12-18 14:47:25 +0100 |
commit | 0de959f9a02a85571ee18db88294c7e763de6dfa (patch) | |
tree | bdf824a7feaa67aab31d9b6c43319a22c72e697e | |
parent | Merge pull request #6534 from kylinstorage/wip-trivial-scrub-cleanup (diff) | |
download | ceph-0de959f9a02a85571ee18db88294c7e763de6dfa.tar.xz ceph-0de959f9a02a85571ee18db88294c7e763de6dfa.zip |
Drop deprecated removal pg type.
FORREMOVAL_ pg type is deprecated and can be removed.
Signed-off-by: Igor Podoski <igor.podoski@ts.fujitsu.com>
m--------- | ceph-object-corpus | 0 | ||||
-rw-r--r-- | src/osd/OSD.cc | 4 | ||||
-rw-r--r-- | src/osd/osd_types.cc | 26 | ||||
-rw-r--r-- | src/osd/osd_types.h | 13 | ||||
-rw-r--r-- | src/tools/ceph_objectstore_tool.cc | 3 |
5 files changed, 5 insertions, 41 deletions
diff --git a/ceph-object-corpus b/ceph-object-corpus -Subproject 67383cc060dd9f90d398eed5a00e31eb70845dd +Subproject 47fbf8c6ae1fb4fca171ac86e98821a67fd3203 diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 0562eed8f3a..bb47d4bf434 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2847,8 +2847,8 @@ void OSD::load_pgs() it != ls.end(); ++it) { spg_t pgid; - if (it->is_temp(&pgid) || it->is_removal(&pgid) || - (it->is_pg(&pgid) && PG::_has_removal_flag(store, pgid))) { + if (it->is_temp(&pgid) || + (it->is_pg(&pgid) && PG::_has_removal_flag(store, pgid))) { dout(10) << "load_pgs " << *it << " clearing temp" << dendl; recursive_remove_collection(store, pgid, *it); continue; diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 849a70d59cd..e9f9585bca2 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -562,11 +562,6 @@ void coll_t::calc_str() case TYPE_PG_TEMP: _str = stringify(pgid) + "_TEMP"; break; - case TYPE_PG_REMOVAL: - _str = string("FORREMOVAL_") + - stringify(removal_seq) + "_" + - stringify(pgid); - break; default: assert(0 == "unknown collection type"); } @@ -598,29 +593,12 @@ bool coll_t::parse(const std::string& s) assert(s == _str); return true; } - if (s.find("FORREMOVAL_") == 0) { - type = TYPE_PG_REMOVAL; - stringstream ss(s.substr(11)); - ss >> removal_seq; - char sep; - ss >> sep; - assert(sep == '_'); - string pgid_str; - ss >> pgid_str; - if (!pgid.parse(pgid_str.c_str())) { - assert(0); - return false; - } - calc_str(); - assert(s == _str); - return true; - } return false; } void coll_t::encode(bufferlist& bl) const { - if (is_removal() || is_temp()) { + if (is_temp()) { // can't express this as v2... __u8 struct_v = 3; ::encode(struct_v, bl); @@ -704,8 +682,6 @@ void coll_t::generate_test_instances(list<coll_t*>& o) o.push_back(new coll_t(spg_t(pg_t(3, 2), shard_id_t(12)))); o.push_back(new coll_t(o.back()->get_temp())); o.push_back(new coll_t()); - o.back()->parse("FORREMOVAL_0_0.1"); - o.back()->parse("FORREMOVAL_123_2.2a3f"); } // --- diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index adcceee497c..a52b7a3c4a4 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -506,7 +506,6 @@ class coll_t { TYPE_LEGACY_TEMP = 1, /* no longer used */ TYPE_PG = 2, TYPE_PG_TEMP = 3, - TYPE_PG_REMOVAL = 4, /* note: deprecated, not encoded */ }; type_t type; spg_t pgid; @@ -563,7 +562,7 @@ public: return type == TYPE_META; } bool is_pg_prefix(spg_t *pgid_) const { - if (type == TYPE_PG || type == TYPE_PG_TEMP || type == TYPE_PG_REMOVAL) { + if (type == TYPE_PG || type == TYPE_PG_TEMP) { *pgid_ = pgid; return true; } @@ -589,16 +588,6 @@ public: } return false; } - bool is_removal() const { - return type == TYPE_PG_REMOVAL; - } - bool is_removal(spg_t *pgid_) const { - if (type == TYPE_PG_REMOVAL) { - *pgid_ = pgid; - return true; - } - return false; - } void encode(bufferlist& bl) const; void decode(bufferlist::iterator& bl); diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index 19c2e38994e..fea9f420d55 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -459,8 +459,7 @@ int finish_remove_pgs(ObjectStore *store) spg_t pgid; if (it->is_temp(&pgid) || - it->is_removal(&pgid) || - (it->is_pg(&pgid) && PG::_has_removal_flag(store, pgid))) { + (it->is_pg(&pgid) && PG::_has_removal_flag(store, pgid))) { cout << "finish_remove_pgs " << *it << " removing " << pgid << std::endl; OSD::recursive_remove_collection(store, pgid, *it); continue; |