@@ -914,7 +914,7 @@ void Objecter::_linger_submit(LingerOp *info,
914914
915915 // Populate Op::target
916916 OSDSession *s = NULL ;
917- int r = _calc_target (&info->target , nullptr );
917+ int r = _calc_target (&info->target );
918918 switch (r) {
919919 case RECALC_OP_TARGET_POOL_EIO:
920920 _check_linger_pool_eio (info);
@@ -1146,8 +1146,7 @@ void Objecter::_scan_requests(
11461146 if (pool_full_map)
11471147 force_resend_writes = force_resend_writes ||
11481148 (*pool_full_map)[op->target .base_oloc .pool ];
1149- int r = _calc_target (&op->target ,
1150- op->session ? op->session ->con .get () : nullptr );
1149+ int r = _calc_target (&op->target );
11511150 switch (r) {
11521151 case RECALC_OP_TARGET_NO_ACTION:
11531152 if (!skipped_map && !(force_resend_writes && op->target .respects_full ()))
@@ -1349,7 +1348,7 @@ void Objecter::handle_osd_map(MOSDMap *m)
13491348 Op *op = p->second ;
13501349 if (op->target .epoch < osdmap->get_epoch ()) {
13511350 ldout (cct, 10 ) << __func__ << " checking op " << p->first << dendl;
1352- int r = _calc_target (&op->target , nullptr );
1351+ int r = _calc_target (&op->target );
13531352 if (r == RECALC_OP_TARGET_POOL_DNE) {
13541353 p = need_resend.erase (p);
13551354 _check_op_pool_dne (op, nullptr );
@@ -2491,7 +2490,7 @@ void Objecter::_op_submit(Op *op, shunique_lock<ceph::shared_mutex>& sul, ceph_t
24912490 OSDSession *s = NULL ;
24922491
24932492 bool check_for_latest_map = false ;
2494- int r = _calc_target (&op->target , nullptr );
2493+ int r = _calc_target (&op->target );
24952494 switch (r) {
24962495 case RECALC_OP_TARGET_POOL_DNE:
24972496 check_for_latest_map = true ;
@@ -2519,7 +2518,7 @@ void Objecter::_op_submit(Op *op, shunique_lock<ceph::shared_mutex>& sul, ceph_t
25192518 // map changed; recalculate mapping
25202519 ldout (cct, 10 ) << __func__ << " relock raced with osdmap, recalc target"
25212520 << dendl;
2522- check_for_latest_map = _calc_target (&op->target , nullptr )
2521+ check_for_latest_map = _calc_target (&op->target )
25232522 == RECALC_OP_TARGET_POOL_DNE;
25242523 if (s) {
25252524 put_session (s);
@@ -2936,7 +2935,7 @@ void Objecter::_prune_snapc(
29362935 }
29372936}
29382937
2939- int Objecter::_calc_target (op_target_t *t, Connection *con, bool any_change)
2938+ int Objecter::_calc_target (op_target_t *t, bool any_change)
29402939{
29412940 // rwlock is locked
29422941 bool is_read = t->flags & CEPH_OSD_FLAG_READ;
@@ -3185,7 +3184,7 @@ int Objecter::_calc_target(op_target_t *t, Connection *con, bool any_change)
31853184int Objecter::_map_session (op_target_t *target, OSDSession **s,
31863185 shunique_lock<ceph::shared_mutex>& sul)
31873186{
3188- _calc_target (target, nullptr );
3187+ _calc_target (target);
31893188 return _get_session (target->osd , s, sul);
31903189}
31913190
@@ -3294,7 +3293,7 @@ int Objecter::_recalc_linger_op_target(LingerOp *linger_op,
32943293{
32953294 // rwlock is locked unique
32963295
3297- int r = _calc_target (&linger_op->target , nullptr , true );
3296+ int r = _calc_target (&linger_op->target , true );
32983297 if (r == RECALC_OP_TARGET_NEED_RESEND) {
32993298 ldout (cct, 10 ) << " recalc_linger_op_target tid " << linger_op->linger_id
33003299 << " pgid " << linger_op->target .pgid
@@ -5140,7 +5139,7 @@ int Objecter::_calc_command_target(CommandOp *c,
51405139 }
51415140 c->target .osd = c->target_osd ;
51425141 } else {
5143- int ret = _calc_target (&(c->target ), nullptr , true );
5142+ int ret = _calc_target (&(c->target ), true );
51445143 if (ret == RECALC_OP_TARGET_POOL_DNE) {
51455144 c->map_check_error = -ENOENT;
51465145 c->map_check_error_str = " pool dne" ;
0 commit comments