]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: make message check helpers const
authorSage Weil <sage@redhat.com>
Mon, 20 Feb 2017 17:25:27 +0000 (12:25 -0500)
committerSage Weil <sage@redhat.com>
Mon, 20 Feb 2017 19:22:05 +0000 (14:22 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h

index b7cc4b1ddcd67c2fd31b6195af4c2410f6cf62d2..507a5f592b50bb711fd98c2939f1d3cf76b34a72 100644 (file)
@@ -7632,7 +7632,7 @@ bool OSD::require_mon_peer(const Message *m)
   return true;
 }
 
-bool OSD::require_osd_peer(Message *m)
+bool OSD::require_osd_peer(const Message *m)
 {
   if (!m->get_connection()->peer_is_osd()) {
     dout(0) << "require_osd_peer received from non-osd "
@@ -7643,7 +7643,7 @@ bool OSD::require_osd_peer(Message *m)
   return true;
 }
 
-bool OSD::require_self_aliveness(Message *m, epoch_t epoch)
+bool OSD::require_self_aliveness(const Message *m, epoch_t epoch)
 {
   epoch_t up_epoch = service.get_up_epoch();
   if (epoch < up_epoch) {
@@ -7659,7 +7659,7 @@ bool OSD::require_self_aliveness(Message *m, epoch_t epoch)
   return true;
 }
 
-bool OSD::require_same_peer_instance(Message *m, OSDMapRef& map,
+bool OSD::require_same_peer_instance(const Message *m, OSDMapRef& map,
                                     bool is_fast_dispatch)
 {
   int from = m->get_source().num();
@@ -8932,7 +8932,7 @@ void OSD::handle_replica_op(OpRequestRef& op, OSDMapRef& osdmap)
   }
 }
 
-bool OSD::op_is_discardable(MOSDOp *op)
+bool OSD::op_is_discardable(const MOSDOp *op)
 {
   // drop client request if they are not connected and can't get the
   // reply anyway.
index 6d2de7ce634404a111bcaa577e597ae01348eb37..23ce54a961871c0bbd9775a941d3ef879a034a14 100644 (file)
@@ -2231,18 +2231,18 @@ protected:
                OSDMapRef map);
 
   bool require_mon_peer(const Message *m);
-  bool require_osd_peer(Message *m);
+  bool require_osd_peer(const Message *m);
   /***
    * Verifies that we were alive in the given epoch, and that
    * still are.
    */
-  bool require_self_aliveness(Message *m, epoch_t alive_since);
+  bool require_self_aliveness(const Message *m, epoch_t alive_since);
   /**
    * Verifies that the OSD who sent the given op has the same
    * address as in the given map.
    * @pre op was sent by an OSD using the cluster messenger
    */
-  bool require_same_peer_instance(Message *m, OSDMapRef& map,
+  bool require_same_peer_instance(const Message *m, OSDMapRef& map,
                                  bool is_fast_dispatch);
 
   bool require_same_or_newer_map(OpRequestRef& op, epoch_t e,
@@ -2493,7 +2493,7 @@ public:
   void handle_signal(int signum);
 
   /// check if we can throw out op from a disconnected client
-  static bool op_is_discardable(MOSDOp *m);
+  static bool op_is_discardable(const MOSDOp *m);
 
 public:
   OSDService service;