// 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);
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()))
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);
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;
// 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);
}
}
-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;
int Objecter::_map_session(op_target_t *target, OSDSession **s,
shunique_lock<ceph::shared_mutex>& sul)
{
- _calc_target(target, nullptr);
+ _calc_target(target);
return _get_session(target->osd, s, sul);
}
{
// 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
}
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";