]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD,PG: pass through EC messages
authorSamuel Just <sam.just@inktank.com>
Sat, 1 Feb 2014 04:06:58 +0000 (20:06 -0800)
committerSamuel Just <sam.just@inktank.com>
Tue, 18 Feb 2014 04:12:16 +0000 (20:12 -0800)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/OSD.cc
src/osd/PG.cc

index 9bd7206ed6d71fdc1c86ab078753c31defb7f10e..b3204e6996a969fbb8498e6bd2b96d3f51071127 100644 (file)
 #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<MOSDPGPushReply, MSG_OSD_PG_PUSH_REPLY>(op);
     break;
+  case MSG_OSD_EC_WRITE:
+    handle_replica_op<MOSDECSubOpWrite, MSG_OSD_EC_WRITE>(op);
+    break;
+  case MSG_OSD_EC_WRITE_REPLY:
+    handle_replica_op<MOSDECSubOpWriteReply, MSG_OSD_EC_WRITE_REPLY>(op);
+    break;
+  case MSG_OSD_EC_READ:
+    handle_replica_op<MOSDECSubOpRead, MSG_OSD_EC_READ>(op);
+    break;
+  case MSG_OSD_EC_READ_REPLY:
+    handle_replica_op<MOSDECSubOpReadReply, MSG_OSD_EC_READ_REPLY>(op);
+    break;
   }
 }
 
index 6cc476ea1f9cc7cf7de65a8a583ca67191125bb0..2752aa5324f70f6e6fbd88c14edf00d7b6fb62c5 100644 (file)
 #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<MOSDPGPushReply, MSG_OSD_PG_PUSH_REPLY>(op);
   case MSG_OSD_SUBOPREPLY:
     return false;
+
+  case MSG_OSD_EC_WRITE:
+    return can_discard_replica_op<MOSDECSubOpWrite, MSG_OSD_EC_WRITE>(op);
+  case MSG_OSD_EC_WRITE_REPLY:
+    return can_discard_replica_op<MOSDECSubOpWriteReply, MSG_OSD_EC_WRITE_REPLY>(op);
+  case MSG_OSD_EC_READ:
+    return can_discard_replica_op<MOSDECSubOpRead, MSG_OSD_EC_READ>(op);
+  case MSG_OSD_EC_READ_REPLY:
+    return can_discard_replica_op<MOSDECSubOpReadReply, MSG_OSD_EC_READ_REPLY>(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<MOSDPGPushReply*>(op->get_req())->map_epoch);
+
+  case MSG_OSD_EC_WRITE:
+    return !have_same_or_newer_map(
+      curmap,
+      static_cast<MOSDECSubOpWrite*>(op->get_req())->map_epoch);
+
+  case MSG_OSD_EC_WRITE_REPLY:
+    return !have_same_or_newer_map(
+      curmap,
+      static_cast<MOSDECSubOpWriteReply*>(op->get_req())->map_epoch);
+
+  case MSG_OSD_EC_READ:
+    return !have_same_or_newer_map(
+      curmap,
+      static_cast<MOSDECSubOpRead*>(op->get_req())->map_epoch);
+
+  case MSG_OSD_EC_READ_REPLY:
+    return !have_same_or_newer_map(
+      curmap,
+      static_cast<MOSDECSubOpReadReply*>(op->get_req())->map_epoch);
   }
   assert(0);
   return false;