From: Alex Ainscow Date: Fri, 3 Oct 2025 14:11:00 +0000 (+0100) Subject: osdc: Remove unused con parameter from Objecter::_calc_target() X-Git-Tag: testing/wip-rishabh-testing-20251128.121606-debug~3^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=39d5c7f8678958d9c6416591227f1355bd169b67;p=ceph-ci.git osdc: Remove unused con parameter from Objecter::_calc_target() This parameter is not used by the _calc_target code. It is being removed just to clean up the code, as we are making some changes to _calc_target in later stages of the split io PR. Signed-off-by: Alex Ainscow --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index ee5018cdca1..e5c3c1209e2 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -914,7 +914,7 @@ void Objecter::_linger_submit(LingerOp *info, // Populate Op::target OSDSession *s = NULL; - int r = _calc_target(&info->target, nullptr); + int r = _calc_target(&info->target); switch (r) { case RECALC_OP_TARGET_POOL_EIO: _check_linger_pool_eio(info); @@ -1146,8 +1146,7 @@ void Objecter::_scan_requests( if (pool_full_map) force_resend_writes = force_resend_writes || (*pool_full_map)[op->target.base_oloc.pool]; - int r = _calc_target(&op->target, - op->session ? op->session->con.get() : nullptr); + int r = _calc_target(&op->target); switch (r) { case RECALC_OP_TARGET_NO_ACTION: if (!skipped_map && !(force_resend_writes && op->target.respects_full())) @@ -1349,7 +1348,7 @@ void Objecter::handle_osd_map(MOSDMap *m) Op *op = p->second; if (op->target.epoch < osdmap->get_epoch()) { ldout(cct, 10) << __func__ << " checking op " << p->first << dendl; - int r = _calc_target(&op->target, nullptr); + int r = _calc_target(&op->target); if (r == RECALC_OP_TARGET_POOL_DNE) { p = need_resend.erase(p); _check_op_pool_dne(op, nullptr); @@ -2491,7 +2490,7 @@ void Objecter::_op_submit(Op *op, shunique_lock& sul, ceph_t OSDSession *s = NULL; bool check_for_latest_map = false; - int r = _calc_target(&op->target, nullptr); + int r = _calc_target(&op->target); switch(r) { case RECALC_OP_TARGET_POOL_DNE: check_for_latest_map = true; @@ -2519,7 +2518,7 @@ void Objecter::_op_submit(Op *op, shunique_lock& sul, ceph_t // map changed; recalculate mapping ldout(cct, 10) << __func__ << " relock raced with osdmap, recalc target" << dendl; - check_for_latest_map = _calc_target(&op->target, nullptr) + check_for_latest_map = _calc_target(&op->target) == RECALC_OP_TARGET_POOL_DNE; if (s) { put_session(s); @@ -2936,7 +2935,7 @@ void Objecter::_prune_snapc( } } -int Objecter::_calc_target(op_target_t *t, Connection *con, bool any_change) +int Objecter::_calc_target(op_target_t *t, bool any_change) { // rwlock is locked 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) int Objecter::_map_session(op_target_t *target, OSDSession **s, shunique_lock& sul) { - _calc_target(target, nullptr); + _calc_target(target); return _get_session(target->osd, s, sul); } @@ -3294,7 +3293,7 @@ int Objecter::_recalc_linger_op_target(LingerOp *linger_op, { // rwlock is locked unique - int r = _calc_target(&linger_op->target, nullptr, true); + int r = _calc_target(&linger_op->target, true); if (r == RECALC_OP_TARGET_NEED_RESEND) { ldout(cct, 10) << "recalc_linger_op_target tid " << linger_op->linger_id << " pgid " << linger_op->target.pgid @@ -5140,7 +5139,7 @@ int Objecter::_calc_command_target(CommandOp *c, } c->target.osd = c->target_osd; } else { - int ret = _calc_target(&(c->target), nullptr, true); + int ret = _calc_target(&(c->target), true); if (ret == RECALC_OP_TARGET_POOL_DNE) { c->map_check_error = -ENOENT; c->map_check_error_str = "pool dne"; diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 4a72662e0c7..7f43f5d2944 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -2559,8 +2559,7 @@ public: Op *op); bool target_should_be_paused(op_target_t *op); - int _calc_target(op_target_t *t, Connection *con, - bool any_change = false); + int _calc_target(op_target_t *t, bool any_change = false); int _map_session(op_target_t *op, OSDSession **s, ceph::shunique_lock& lc);