From ac16a9dfe04906a360d128154c08a5fae87d8753 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 19 Dec 2013 13:28:09 -0800 Subject: [PATCH] osd: remove remaining instances of raid4 pool types (never implemented) Signed-off-by: Sage Weil --- src/crush/CrushCompiler.cc | 5 ----- src/crush/grammar.h | 2 +- src/crush/sample.txt | 2 +- src/include/rados.h | 2 +- src/mon/MonCommands.h | 2 +- src/mon/OSDMonitor.cc | 2 -- src/osd/osd_types.h | 6 ++---- 7 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/crush/CrushCompiler.cc b/src/crush/CrushCompiler.cc index 422480f4f1f1e..9a210d1ea0402 100644 --- a/src/crush/CrushCompiler.cc +++ b/src/crush/CrushCompiler.cc @@ -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 diff --git a/src/crush/grammar.h b/src/crush/grammar.h index 9525d7931bc06..b1e1aef932119 100644 --- a/src/crush/grammar.h +++ b/src/crush/grammar.h @@ -147,7 +147,7 @@ struct crush_grammar : public 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 diff --git a/src/crush/sample.txt b/src/crush/sample.txt index aef39626d450e..f7e0ac3968d5a 100644 --- a/src/crush/sample.txt +++ b/src/crush/sample.txt @@ -38,7 +38,7 @@ rule normal { rule { pool 1 - type raid4 + type erasure min_size 3 max_size 6 step take root diff --git a/src/include/rados.h b/src/include/rados.h index 6dc6718cdfe46..e52d2087da713 100644 --- a/src/include/rados.h +++ b/src/include/rados.h @@ -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 /* diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index 58304b7bf015b..79505f256c32d 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -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 " \ diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 73f9f04516f76..4fa796e4d63a9 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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 diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 83a22165b3cc2..72aaad735d29e 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -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: -- 2.39.5