]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG.cc: use static_cast instead of C-Style cast
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 1 Mar 2013 16:11:31 +0000 (17:11 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 1 Mar 2013 16:11:31 +0000 (17:11 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/osd/PG.cc

index d5a0a09433348ae5472584bd13d453f7169a1ac6..7f9b4ba16b9de0fd58151a5dd502de7703c1234a 100644 (file)
@@ -2910,7 +2910,7 @@ void PG::unreg_next_scrub()
 
 void PG::sub_op_scrub_map(OpRequestRef op)
 {
-  MOSDSubOp *m = (MOSDSubOp *)op->request;
+  MOSDSubOp *m = static_cast<MOSDSubOp *>(op->request);
   assert(m->get_header().type == MSG_OSD_SUBOP);
   dout(7) << "sub_op_scrub_map" << dendl;
 
@@ -3067,7 +3067,7 @@ void PG::_request_scrub_map(int replica, eversion_t version,
 
 void PG::sub_op_scrub_reserve(OpRequestRef op)
 {
-  MOSDSubOp *m = (MOSDSubOp*)op->request;
+  MOSDSubOp *m = static_cast<MOSDSubOp*>(op->request);
   assert(m->get_header().type == MSG_OSD_SUBOP);
   dout(7) << "sub_op_scrub_reserve" << dendl;
 
@@ -3087,7 +3087,7 @@ void PG::sub_op_scrub_reserve(OpRequestRef op)
 
 void PG::sub_op_scrub_reserve_reply(OpRequestRef op)
 {
-  MOSDSubOpReply *reply = (MOSDSubOpReply*)op->request;
+  MOSDSubOpReply *reply = static_cast<MOSDSubOpReply*>(op->request);
   assert(reply->get_header().type == MSG_OSD_SUBOPREPLY);
   dout(7) << "sub_op_scrub_reserve_reply" << dendl;
 
@@ -3132,7 +3132,7 @@ void PG::sub_op_scrub_stop(OpRequestRef op)
 {
   op->mark_started();
 
-  MOSDSubOp *m = (MOSDSubOp*)op->request;
+  MOSDSubOp *m = static_cast<MOSDSubOp*>(op->request);
   assert(m->get_header().type == MSG_OSD_SUBOP);
   dout(7) << "sub_op_scrub_stop" << dendl;
 
@@ -4793,7 +4793,7 @@ ostream& operator<<(ostream& out, const PG& pg)
 
 bool PG::can_discard_op(OpRequestRef op)
 {
-  MOSDOp *m = (MOSDOp*)op->request;
+  MOSDOp *m = static_cast<MOSDOp*>(op->request);
   if (OSD::op_is_discardable(m)) {
     dout(20) << " discard " << *m << dendl;
     return true;
@@ -4820,7 +4820,7 @@ bool PG::can_discard_op(OpRequestRef op)
 
 bool PG::can_discard_subop(OpRequestRef op)
 {
-  MOSDSubOp *m = (MOSDSubOp *)op->request;
+  MOSDSubOp *m = static_cast<MOSDSubOp *>(op->request);
   assert(m->get_header().type == MSG_OSD_SUBOP);
 
   // same pg?
@@ -4836,7 +4836,7 @@ bool PG::can_discard_subop(OpRequestRef op)
 
 bool PG::can_discard_scan(OpRequestRef op)
 {
-  MOSDPGScan *m = (MOSDPGScan *)op->request;
+  MOSDPGScan *m = static_cast<MOSDPGScan *>(op->request);
   assert(m->get_header().type == MSG_OSD_PG_SCAN);
 
   if (old_peering_msg(m->map_epoch, m->query_epoch)) {
@@ -4848,7 +4848,7 @@ bool PG::can_discard_scan(OpRequestRef op)
 
 bool PG::can_discard_backfill(OpRequestRef op)
 {
-  MOSDPGBackfill *m = (MOSDPGBackfill *)op->request;
+  MOSDPGBackfill *m = static_cast<MOSDPGBackfill *>(op->request);
   assert(m->get_header().type == MSG_OSD_PG_BACKFILL);
 
   if (old_peering_msg(m->map_epoch, m->query_epoch)) {