From: Samuel Just Date: Sat, 1 Feb 2014 04:06:58 +0000 (-0800) Subject: OSD,PG: pass through EC messages X-Git-Tag: v0.78~163^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7772014a4a426316e6ea9b6633c79327cb3bc4d9;p=ceph.git OSD,PG: pass through EC messages Signed-off-by: Samuel Just --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 9bd7206ed6d71..b3204e6996a96 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 6cc476ea1f9cc..2752aa5324f70 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;