Objecter shouldn't sent ops with mixed rwordered and balance_read flags
Fixes: https://tracker.ceph.com/issues/70715
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit
40292f2fd10f338c9baab60a019dfe4806e642c7)
int _op_cancel(ceph_tid_t tid, int r);
int get_read_flags(int flags) {
- return flags | global_op_flags | extra_read_flags.load(std::memory_order_relaxed) |
- CEPH_OSD_FLAG_READ;
+ int ret = flags | global_op_flags |
+ extra_read_flags.load(std::memory_order_relaxed) |
+ CEPH_OSD_FLAG_READ;
+
+ // If the op is rwordered, strip out the balanced and localized flags.
+ if (flags & CEPH_OSD_FLAG_RWORDERED) {
+ ret &= ~(CEPH_OSD_FLAG_BALANCE_READS | CEPH_OSD_FLAG_LOCALIZE_READS);
+ }
+ return ret;
}
public: