diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 9bd7206ed6d..b3204e6996a 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -82,6 +82,10 @@ #include "messages/MOSDPGMissing.h" #include "messages/MBackfillReserve.h" #include "messages/MRecoveryReserve.h" +#include "messages/MOSDECSubOpWrite.h" +#include "messages/MOSDECSubOpWriteReply.h" +#include "messages/MOSDECSubOpRead.h" +#include "messages/MOSDECSubOpReadReply.h" #include "messages/MOSDAlive.h" @@ -4767,6 +4771,18 @@ void OSD::dispatch_op(OpRequestRef op) case MSG_OSD_PG_PUSH_REPLY: handle_replica_op(op); break; + case MSG_OSD_EC_WRITE: + handle_replica_op(op); + break; + case MSG_OSD_EC_WRITE_REPLY: + handle_replica_op(op); + break; + case MSG_OSD_EC_READ: + handle_replica_op(op); + break; + case MSG_OSD_EC_READ_REPLY: + handle_replica_op(op); + break; } } diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 6cc476ea1f9..2752aa5324f 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -33,6 +33,10 @@ #include "messages/MOSDPGPush.h" #include "messages/MOSDPGPushReply.h" #include "messages/MOSDPGPull.h" +#include "messages/MOSDECSubOpWrite.h" +#include "messages/MOSDECSubOpWriteReply.h" +#include "messages/MOSDECSubOpRead.h" +#include "messages/MOSDECSubOpReadReply.h" #include "messages/MOSDSubOp.h" #include "messages/MOSDSubOpReply.h" @@ -4979,9 +4983,18 @@ bool PG::can_discard_request(OpRequestRef op) return can_discard_replica_op(op); case MSG_OSD_SUBOPREPLY: return false; + + case MSG_OSD_EC_WRITE: + return can_discard_replica_op(op); + case MSG_OSD_EC_WRITE_REPLY: + return can_discard_replica_op(op); + case MSG_OSD_EC_READ: + return can_discard_replica_op(op); + case MSG_OSD_EC_READ_REPLY: + return can_discard_replica_op(op); + case MSG_OSD_PG_SCAN: return can_discard_scan(op); - case MSG_OSD_PG_BACKFILL: return can_discard_backfill(op); } @@ -5040,6 +5053,26 @@ bool PG::op_must_wait_for_map(OSDMapRef curmap, OpRequestRef op) return !have_same_or_newer_map( curmap, static_cast(op->get_req())->map_epoch); + + case MSG_OSD_EC_WRITE: + return !have_same_or_newer_map( + curmap, + static_cast(op->get_req())->map_epoch); + + case MSG_OSD_EC_WRITE_REPLY: + return !have_same_or_newer_map( + curmap, + static_cast(op->get_req())->map_epoch); + + case MSG_OSD_EC_READ: + return !have_same_or_newer_map( + curmap, + static_cast(op->get_req())->map_epoch); + + case MSG_OSD_EC_READ_REPLY: + return !have_same_or_newer_map( + curmap, + static_cast(op->get_req())->map_epoch); } assert(0); return false;