]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Create a new interval when the optimization flag gets switch on.
authorAlex Ainscow <aainscow@uk.ibm.com>
Tue, 11 Mar 2025 11:00:01 +0000 (11:00 +0000)
committerAlex Ainscow <aainscow@uk.ibm.com>
Wed, 2 Apr 2025 22:34:08 +0000 (23:34 +0100)
This allows for the old EC code to cleanly shutdown using the on_change
notification. The new code can then start up cleanly.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/osd/osd_types.cc
src/osd/osd_types.h
src/osdc/Objecter.cc
src/osdc/Objecter.h

index 0e9d9e7e78e73a926a9723dc48dd3c16da828c3d..0ddae3f1492bfbf35b54349c9a1c7f8dcd842574 100644 (file)
@@ -4199,6 +4199,8 @@ bool PastIntervals::is_new_interval(
   uint32_t new_crush_barrier,
   int32_t old_crush_member,
   int32_t new_crush_member,
+  bool old_allow_ec_optimizations,
+  bool new_allow_ec_optimizations,
   pg_t pgid) {
   return old_acting_primary != new_acting_primary ||
     new_acting != old_acting ||
@@ -4222,7 +4224,8 @@ bool PastIntervals::is_new_interval(
     old_crush_count != new_crush_count ||
     old_crush_target != new_crush_target ||
     old_crush_barrier != new_crush_barrier ||
-    old_crush_member != new_crush_member;
+    old_crush_member != new_crush_member ||
+    old_allow_ec_optimizations != new_allow_ec_optimizations;
 }
 
 bool PastIntervals::is_new_interval(
@@ -4271,6 +4274,7 @@ bool PastIntervals::is_new_interval(
                    plast->peering_crush_bucket_target, pi->peering_crush_bucket_target,
                    plast->peering_crush_bucket_barrier, pi->peering_crush_bucket_barrier,
                    plast->peering_crush_mandatory_member, pi->peering_crush_mandatory_member,
+                   plast->allows_ecoptimizations(), pi->allows_ecoptimizations(),
                    pgid);
 }
 
index e30f160b7cb53a3b63ccb25ff41ee75f37baddb1..ea0c3c1dda6f5dcf352ac0298a56face298537aa 100644 (file)
@@ -3461,6 +3461,8 @@ public:
     uint32_t new_crush_barrier,
     int32_t old_crush_member,
     int32_t new_crush_member,
+    bool old_allow_ec_optimizations,
+    bool new_allow_ec_optimizations,
     pg_t pgid
     );
 
index ad371fefb2dde5ecc77b22d09d0e8a89dd205b33..837953f39ae042c0229c877151ae9c260e54fb05 100644 (file)
@@ -2934,6 +2934,8 @@ int Objecter::_calc_target(op_target_t *t, Connection *con, bool any_change)
        pi->peering_crush_bucket_barrier,
        t->peering_crush_mandatory_member,
        pi->peering_crush_mandatory_member,
+       t->allows_ecoptimizations,
+       pi->allows_ecoptimizations(),
        prev_pgid)) {
     force_resend = true;
   }
@@ -2989,6 +2991,7 @@ int Objecter::_calc_target(op_target_t *t, Connection *con, bool any_change)
     t->peering_crush_bucket_target = pi->peering_crush_bucket_target;
     t->peering_crush_bucket_barrier = pi->peering_crush_bucket_barrier;
     t->peering_crush_mandatory_member = pi->peering_crush_mandatory_member;
+    t->allows_ecoptimizations = pi->allows_ecoptimizations();
     ldout(cct, 10) << __func__ << " "
                   << " raw pgid " << pgid << " -> actual " << t->actual_pgid
                   << " acting " << t->acting
index 862d4d0cdaf1d59028eddbaf5805f259a80d8798..f9a985c4f21ddc3e0b18ba71f152f087f71f5e1c 100644 (file)
@@ -1856,6 +1856,7 @@ public:
     int min_size = -1; ///< the min size of the pool when were were last mapped
     bool sort_bitwise = false; ///< whether the hobject_t sort order is bitwise
     bool recovery_deletes = false; ///< whether the deletes are performed during recovery instead of peering
+    bool allows_ecoptimizations = false; ///< whether EC plugin optimizations are enabled.
     uint32_t peering_crush_bucket_count = 0;
     uint32_t peering_crush_bucket_target = 0;
     uint32_t peering_crush_bucket_barrier = 0;