]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/crush/CrushWrapper.h
import ceph nautilus 14.2.2
[ceph.git] / ceph / src / crush / CrushWrapper.h
index 5abd0f42d6311139ef17f6bb57114ef03812eaea..a1ad8b5843152d9a543fee6e0d4cd343c87eb1be 100644 (file)
@@ -505,6 +505,12 @@ public:
       return 0;
     return get_class_name(p->second);
   }
+  int get_item_class_id(int t) const {
+    auto p = class_map.find(t);
+    if (p == class_map.end())
+      return -ENOENT;
+    return p->second;
+  }
   int set_item_class(int i, const string& name) {
     if (!is_valid_crush_name(name))
       return -EINVAL;