]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/osd/scheduler/mClockScheduler.h
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / osd / scheduler / mClockScheduler.h
index 3d958bed9dcd4f3cf012114143be99a6afb80d1d..f708b1d7a1e38cdb487d0c723b97835000db866b 100644 (file)
@@ -38,12 +38,30 @@ constexpr double default_max = std::numeric_limits<double>::is_iec559 ?
   std::numeric_limits<double>::infinity() :
   std::numeric_limits<double>::max();
 
-using client_id_t = uint64_t;
-using profile_id_t = uint64_t;
-
+/**
+ * client_profile_id_t
+ *
+ * client_id - global id (client.####) for client QoS
+ * profile_id - id generated by client's QoS profile
+ *
+ * Currently (Reef and below), both members are set to
+ * 0 which ensures that all external clients share the
+ * mClock profile allocated reservation and limit
+ * bandwidth.
+ *
+ * Note: Post Reef, both members will be set to non-zero
+ * values when the distributed feature of the mClock
+ * algorithm is utilized.
+ */
 struct client_profile_id_t {
-  client_id_t client_id;
-  profile_id_t profile_id;
+  uint64_t client_id = 0;
+  uint64_t profile_id = 0;
+
+  client_profile_id_t(uint64_t _client_id, uint64_t _profile_id) :
+    client_id(_client_id),
+    profile_id(_profile_id) {}
+
+  client_profile_id_t() = default;
 
   auto operator<=>(const client_profile_id_t&) const = default;
   friend std::ostream& operator<<(std::ostream& out,
@@ -177,10 +195,7 @@ class mClockScheduler : public OpScheduler, md_config_obs_t {
   static scheduler_id_t get_scheduler_id(const OpSchedulerItem &item) {
     return scheduler_id_t{
       item.get_scheduler_class(),
-       client_profile_id_t{
-       item.get_owner(),
-         0
-         }
+      client_profile_id_t()
     };
   }