Skip to content

Commit

Permalink
crimson/osd/osd_operations/client_request: Support librados::OPERATIO…
Browse files Browse the repository at this point in the history
…N_ORDERSNAP

Signed-off-by: Matan Breizman <[email protected]>
  • Loading branch information
Matan-B committed Mar 15, 2023
1 parent b5ef106 commit 749e0ec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/crimson/osd/osd_operations/client_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,15 @@ ClientRequest::do_process(

SnapContext snapc = get_snapc(pg,obc);

if ((m->has_flag(CEPH_OSD_FLAG_ORDERSNAP)) &&
snapc.seq < obc->ssc->snapset.seq) {
logger().debug("{} ORDERSNAP flag set and snapc seq {}",
" < snapset seq {} on {}",
__func__, snapc.seq, obc->ssc->snapset.seq,
obc->obs.oi.soid);
return reply_op_error(pg, -EOLDSNAPC);
}

if (!pg->is_primary()) {
// primary can handle both normal ops and balanced reads
if (is_misdirected(*pg)) {
Expand Down

0 comments on commit 749e0ec

Please sign in to comment.