]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: remove remaining instances of raid4 pool types (never implemented) 977/head
authorSage Weil <sage@inktank.com>
Thu, 19 Dec 2013 21:28:09 +0000 (13:28 -0800)
committerSage Weil <sage@inktank.com>
Thu, 19 Dec 2013 21:28:09 +0000 (13:28 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/crush/CrushCompiler.cc
src/crush/grammar.h
src/crush/sample.txt
src/include/rados.h
src/mon/MonCommands.h
src/mon/OSDMonitor.cc
src/osd/osd_types.h

index 422480f4f1f1ef203111b09ed329ee6c0e2eda1e..9a210d1ea040266353d78af5a88eae260272c45f 100644 (file)
@@ -230,9 +230,6 @@ int CrushCompiler::decompile(ostream &out)
     case CEPH_PG_TYPE_REP:
       out << "\ttype replicated\n";
       break;
-    case CEPH_PG_TYPE_RAID4:
-      out << "\ttype raid4\n";
-      break;
     case CEPH_PG_TYPE_ERASURE:
       out << "\ttype erasure\n";
       break;
@@ -587,8 +584,6 @@ int CrushCompiler::parse_rule(iter_t const& i)
   int type;
   if (tname == "replicated")
     type = CEPH_PG_TYPE_REP;
-  else if (tname == "raid4")
-    type = CEPH_PG_TYPE_RAID4;
   else if (tname == "erasure")
     type = CEPH_PG_TYPE_ERASURE;
   else 
index 9525d7931bc068cc8257e4f0088e13e4f4b84ea1..b1e1aef9321193d15505dfdc3f31ddb8762a17ac 100644 (file)
@@ -147,7 +147,7 @@ struct crush_grammar : public grammar<crush_grammar>
                                step_emit );
       crushrule = str_p("rule") >> !name >> '{'
                           >> str_p("ruleset") >> posint
-                          >> str_p("type") >> ( str_p("replicated") | str_p("raid4") | str_p("erasure") )
+                          >> str_p("type") >> ( str_p("replicated") | str_p("erasure") )
                           >> str_p("min_size") >> posint
                           >> str_p("max_size") >> posint
                           >> +step
index aef39626d450e8c3848b2c77f5852dc1b452219a..f7e0ac3968d5a263d1320522744dd7255b6159cf 100644 (file)
@@ -38,7 +38,7 @@ rule normal {
 
 rule {
      pool 1
-     type raid4
+     type erasure
      min_size 3
      max_size 6
      step take root
index 6dc6718cdfe46ead3f4d31bb31e4c16ae519ea32..e52d2087da713a12a1bccab029445e2471879f9a 100644 (file)
@@ -69,7 +69,7 @@ struct ceph_pg {
  * duplicated here only for CrushCompiler's benefit.
  */
 #define CEPH_PG_TYPE_REP     1
-#define CEPH_PG_TYPE_RAID4   2
+/* #define CEPH_PG_TYPE_RAID4   2   never implemented */
 #define CEPH_PG_TYPE_ERASURE 3
 
 /*
index 58304b7bf015b1402466401c03862a92c9844a8f..79505f256c32da7e2378f352f702ac8695c5ff38 100644 (file)
@@ -496,7 +496,7 @@ COMMAND("osd pool create " \
        "name=pool,type=CephPoolname " \
        "name=pg_num,type=CephInt,range=0 " \
        "name=pgp_num,type=CephInt,range=0,req=false " \
-        "name=pool_type,type=CephChoices,strings=rep|raid4|erasure,req=false " \
+        "name=pool_type,type=CephChoices,strings=rep|erasure,req=false " \
        "name=properties,type=CephString,n=N,req=false,goodchars=[A-Za-z0-9-_.=]", \
        "create pool", "osd", "rw", "cli,rest")
 COMMAND("osd pool delete " \
index 73f9f04516f766e2e9fc6820144b948c54b2eeee..4fa796e4d63a9e684986096cae79973d60e1fc74 100644 (file)
@@ -3957,8 +3957,6 @@ done:
     int pool_type;
     if (pool_type_str.empty() || pool_type_str == "rep") {
       pool_type = pg_pool_t::TYPE_REP;
-    } else if (pool_type_str == "raid4") {
-      pool_type = pg_pool_t::TYPE_RAID4;
     } else if (pool_type_str == "erasure") {
 
       // check if all up osds support erasure coding
index 83a22165b3cc2c974f057798981d39341425f48f..72aaad735d29eb61556acbfe0e4c2c080ac5a14f 100644 (file)
@@ -698,13 +698,13 @@ inline ostream& operator<<(ostream& out, const pool_snap_info_t& si) {
 struct pg_pool_t {
   enum {
     TYPE_REP = 1,     // replication
-    TYPE_RAID4 = 2,   // raid4 (never implemented)
+    //TYPE_RAID4 = 2,   // raid4 (never implemented)
     TYPE_ERASURE = 3,      // erasure-coded
   };
   static const char *get_type_name(int t) {
     switch (t) {
     case TYPE_REP: return "rep";
-    case TYPE_RAID4: return "raid4";
+      //case TYPE_RAID4: return "raid4";
     case TYPE_ERASURE: return "erasure";
     default: return "???";
     }
@@ -862,14 +862,12 @@ public:
   void set_snap_epoch(epoch_t e) { snap_epoch = e; }
 
   bool is_rep()   const { return get_type() == TYPE_REP; }
-  bool is_raid4() const { return get_type() == TYPE_RAID4; }
   bool is_erasure() const { return get_type() == TYPE_ERASURE; }
 
   bool can_shift_osds() const {
     switch (get_type()) {
     case TYPE_REP:
       return true;
-    case TYPE_RAID4:
     case TYPE_ERASURE:
       return false;
     default: