]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Drop deprecated removal pg type. 6970/head
authorIgor Podoski <igor.podoski@ts.fujitsu.com>
Fri, 18 Dec 2015 12:26:43 +0000 (13:26 +0100)
committerIgor Podoski <igor.podoski@ts.fujitsu.com>
Fri, 18 Dec 2015 13:47:25 +0000 (14:47 +0100)
FORREMOVAL_ pg type is deprecated and can be removed.

Signed-off-by: Igor Podoski <igor.podoski@ts.fujitsu.com>
ceph-object-corpus
src/osd/OSD.cc
src/osd/osd_types.cc
src/osd/osd_types.h
src/tools/ceph_objectstore_tool.cc

index 67383cc060dd9f90d398eed5a00e31eb70845dd8..47fbf8c6ae1fb4fca171ac86e98821a67fd32031 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 67383cc060dd9f90d398eed5a00e31eb70845dd8
+Subproject commit 47fbf8c6ae1fb4fca171ac86e98821a67fd32031
index 0562eed8f3a88f5432d2ec4949de0cf49c394c45..bb47d4bf434cc2a8f3c7fea0d771fc1af658edc8 100644 (file)
@@ -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;
index 849a70d59cdc1621cce81e31904ecba7a33f459b..e9f9585bca2c6faa3f3233a2c787d020d6586be1 100644 (file)
@@ -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");
 }
 
 // ---
index adcceee497cf8bf2a7fb107e83b8896cf5fbc6f6..a52b7a3c4a4bf26858f316e963d005007d5858c4 100644 (file)
@@ -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);
index 19c2e38994e7367cd4aba0319b38ec72a22b2409..fea9f420d55ae1ba833a41d180857d2bb1e3498f 100644 (file)
@@ -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;