Skip to content

Commit f68b217

Browse files
committed
PrimeryLogPG: don't accept ops with mixed balance_reads and rwordered flags
do_op can't accept mixed flag of rwordered and balance_read Fixes: https://tracker.ceph.com/issues/70715 Signed-off-by: Nitzan Mordechai <[email protected]>
1 parent 40292f2 commit f68b217

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/osd/PrimaryLogPG.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,6 +2045,15 @@ void PrimaryLogPG::do_op(OpRequestRef& op)
20452045
}
20462046
}
20472047

2048+
// check for op with rwordered and rebalance or localize reads
2049+
if ((m->has_flag(CEPH_OSD_FLAG_BALANCE_READS) || m->has_flag(CEPH_OSD_FLAG_LOCALIZE_READS)) &&
2050+
op->rwordered()) {
2051+
dout(4) << __func__ << ": rebelance or localized reads with rwordered not allowed "
2052+
<< *m << dendl;
2053+
osd->reply_op_error(op, -EINVAL);
2054+
return;
2055+
}
2056+
20482057
if ((m->get_flags() & (CEPH_OSD_FLAG_BALANCE_READS |
20492058
CEPH_OSD_FLAG_LOCALIZE_READS)) &&
20502059
op->may_read() &&

0 commit comments

Comments
 (0)