]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_types: add pg_pool_t FLAG_CRIMSON
authorSamuel Just <sjust@redhat.com>
Wed, 12 Oct 2022 23:33:11 +0000 (23:33 +0000)
committerSamuel Just <sjust@redhat.com>
Tue, 14 Feb 2023 06:36:35 +0000 (22:36 -0800)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/osd_types.h

index 67bc887ef57e04fc39032fd09a28e3248b327acf..4ff68b3485714708a03403474a293f4aac6d57c6 100644 (file)
@@ -1235,6 +1235,10 @@ struct pg_pool_t {
     FLAG_CREATING = 1<<15,          // initial pool PGs are being created
     FLAG_EIO = 1<<16,               // return EIO for all client ops
     FLAG_BULK = 1<<17, //pool is large
+    // PGs from this pool are allowed to be created on crimson osds.
+    // Pool features are restricted to those supported by crimson-osd.
+    // Note, does not prohibit being created on classic osd.
+    FLAG_CRIMSON = 1<<18,
   };
 
   static const char *get_flag_name(uint64_t f) {
@@ -1257,6 +1261,7 @@ struct pg_pool_t {
     case FLAG_CREATING: return "creating";
     case FLAG_EIO: return "eio";
     case FLAG_BULK: return "bulk";
+    case FLAG_CRIMSON: return "crimson";
     default: return "???";
     }
   }
@@ -1311,6 +1316,8 @@ struct pg_pool_t {
       return FLAG_EIO;
     if (name == "bulk")
       return FLAG_BULK;
+    if (name == "crimson")
+      return FLAG_CRIMSON;
     return 0;
   }
 
@@ -1713,6 +1720,10 @@ public:
     return has_flag(FLAG_EC_OVERWRITES);
   }
 
+  bool is_crimson() const {
+    return has_flag(FLAG_CRIMSON);
+  }
+
   bool can_shift_osds() const {
     switch (get_type()) {
     case TYPE_REPLICATED: