]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mon/OSDMonitor.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / mon / OSDMonitor.h
index f90cd4d72fbcb59e781df2cae6d3c87fd8217dc7..55d4e8c10f3aaea3928d250efb47a74b7653107f 100644 (file)
@@ -222,6 +222,7 @@ public:
   ceph::mutex balancer_lock = ceph::make_mutex("OSDMonitor::balancer_lock");
 
   std::map<int,double> osd_weight;
+  std::set<int32_t> filestore_osds;
 
   using osdmap_key_t = std::pair<version_t, uint64_t>;
   using osdmap_cache_t = SimpleLRU<osdmap_key_t,
@@ -242,7 +243,7 @@ public:
 
   bool _have_pending_crush();
   CrushWrapper &_get_stable_crush();
-  void _get_pending_crush(CrushWrapper& newcrush);
+  CrushWrapper _get_pending_crush();
 
   enum FastReadType {
     FAST_READ_OFF,
@@ -514,12 +515,13 @@ private:
                                const std::string &erasure_code_profile,
                                unsigned *stripe_width,
                                std::ostream *ss);
-  int check_pg_num(int64_t pool, int pg_num, int size, std::ostream* ss);
+  int check_pg_num(int64_t pool, int pg_num, int size, int crush_rule, std::ostream* ss);
   int prepare_new_pool(std::string& name,
                       int crush_rule,
                       const std::string &crush_rule_name,
                        unsigned pg_num, unsigned pgp_num,
                       unsigned pg_num_min,
+                      unsigned pg_num_max,
                        uint64_t repl_size,
                       const uint64_t target_size_bytes,
                       const float target_size_ratio,
@@ -528,6 +530,7 @@ private:
                        const uint64_t expected_num_objects,
                        FastReadType fast_read,
                       const std::string& pg_autoscale_mode,
+                      bool bulk,
                       std::ostream *ss);
   int prepare_new_pool(MonOpRequestRef op);
 
@@ -628,6 +631,8 @@ private:
 public:
   void count_metadata(const std::string& field, std::map<std::string,int> *out);
   void get_versions(std::map<std::string, std::list<std::string>> &versions);
+  void get_filestore_osd_list();
+  void check_for_filestore_osds(health_check_map_t *checks);
 protected:
   int get_osd_objectstore_type(int osd, std::string *type);
   bool is_pool_currently_all_bluestore(int64_t pool_id, const pg_pool_t &pool,
@@ -788,9 +793,10 @@ public:
    * This does not make any changes to the pools or state; it's just
    * a safety-check-and-collect function.
    */
-  void try_enable_stretch_mode_pools(stringstream& ss, bool *okay,
+  void try_enable_stretch_mode_pools(std::stringstream& ss, bool *okay,
                                     int *errcode,
-                                    set<pg_pool_t*>* pools, const string& new_crush_rule);
+                                    std::set<pg_pool_t*>* pools,
+                                    const std::string& new_crush_rule);
   /**
    * Check validity of inputs and OSD/CRUSH state to
    * engage stretch mode. Designed to be used with
@@ -807,26 +813,26 @@ public:
    *   from try_enable_stretch_mode_pools()).
    * @param new_crush_rule: The crush rule to set the pools to.
    */
-  void try_enable_stretch_mode(stringstream& ss, bool *okay,
+  void try_enable_stretch_mode(std::stringstream& ss, bool *okay,
                               int *errcode, bool commit,
-                              const string& dividing_bucket,
+                              const std::string& dividing_bucket,
                               uint32_t bucket_count,
-                              const set<pg_pool_t*>& pools,
-                              const string& new_crush_rule);
+                              const std::set<pg_pool_t*>& pools,
+                              const std::string& new_crush_rule);
   /**
    * Check the input dead_buckets mapping (buckets->dead monitors) to see
    * if the OSDs are also down. If so, fill in really_down_buckets and
    * really_down_mons and return true; else return false.
    */
-  bool check_for_dead_crush_zones(const map<string,set<string>>& dead_buckets,
-                                 set<int> *really_down_buckets,
-                                 set<string> *really_down_mons);
+  bool check_for_dead_crush_zones(const std::map<std::string,std::set<std::string>>& dead_buckets,
+                                 std::set<int> *really_down_buckets,
+                                 std::set<std::string> *really_down_mons);
   /**
    * Set degraded mode in the OSDMap, adding the given dead buckets to the dead set
    * and using the live_zones (should presently be size 1)
    */
-  void trigger_degraded_stretch_mode(const set<int>& dead_buckets,
-                                    const set<string>& live_zones);
+  void trigger_degraded_stretch_mode(const std::set<int>& dead_buckets,
+                                    const std::set<std::string>& live_zones);
   /**
    * This is just to maintain stretch_recovery_triggered; below
    */