command_ops[tid] = c;
num_homeless_ops++;
int r = recalc_command_target(c);
- if (r == RECALC_OP_TARGET_OSD_DNE) {
- // XXX take back tid incr?
+ if (r == RECALC_OP_TARGET_OSD_DNE)
+ return -ENOENT;
+ if (r == RECALC_OP_TARGET_OSD_DOWN)
return -ENXIO;
- }
+
if (c->session)
_send_command(c);
else
if (c->target_osd >= 0) {
if (!osdmap->exists(c->target_osd))
return RECALC_OP_TARGET_OSD_DNE;
+ if (osdmap->is_down(c->target_osd))
+ return RECALC_OP_TARGET_OSD_DOWN;
s = get_session(c->target_osd);
} else {
if (!osdmap->have_pg_pool(c->target_pg.pool()))
RECALC_OP_TARGET_NEED_RESEND,
RECALC_OP_TARGET_POOL_DNE,
RECALC_OP_TARGET_OSD_DNE,
+ RECALC_OP_TARGET_OSD_DOWN,
};
int recalc_op_target(Op *op);
bool recalc_linger_op_target(LingerOp *op);