]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PrimeryLogPG: don't accept ops with mixed balance_reads and rwordered flags 64506/head
authorNitzan Mordechai <nmordech@redhat.com>
Mon, 14 Apr 2025 11:50:23 +0000 (11:50 +0000)
committerNitzan Mordechai <nmordech@redhat.com>
Tue, 15 Jul 2025 13:10:06 +0000 (13:10 +0000)
do_op can't accept mixed flag of rwordered and balance_read

Fixes: https://tracker.ceph.com/issues/70715
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit f68b2178a24613960fe1303ece413b24f3ea02e7)

src/osd/PrimaryLogPG.cc

index e826b6c9c65e074c0404d8191264219cf9f8e168..13b800840fe3d8e1c66b9a2fad101bc91536c47d 100644 (file)
@@ -2045,6 +2045,15 @@ void PrimaryLogPG::do_op(OpRequestRef& op)
     }
   }
 
+  // check for op with rwordered and rebalance or localize reads
+  if ((m->has_flag(CEPH_OSD_FLAG_BALANCE_READS) || m->has_flag(CEPH_OSD_FLAG_LOCALIZE_READS)) &&
+      op->rwordered()) {
+    dout(4) << __func__ << ": rebelance or localized reads with rwordered not allowed "
+       << *m << dendl;
+    osd->reply_op_error(op, -EINVAL);
+    return;
+  }
+
   if ((m->get_flags() & (CEPH_OSD_FLAG_BALANCE_READS |
                         CEPH_OSD_FLAG_LOCALIZE_READS)) &&
       op->may_read() &&