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;
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;
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;
{
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;
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;
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?
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)) {
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)) {