From: Sage Weil Date: Mon, 3 Apr 2017 14:11:47 +0000 (-0400) Subject: osdc/Objecter: set target.osd to -1 if command osd is down X-Git-Tag: v12.0.3~192^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7657bd80ebafa67703eec3570480ace987fc3f9e;p=ceph.git osdc/Objecter: set target.osd to -1 if command osd is down Signed-off-by: Sage Weil --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index d45e4c45fb0..1d799dac037 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -4721,11 +4721,13 @@ int Objecter::_calc_command_target(CommandOp *c, shunique_lock& sul) if (!osdmap->exists(c->target_osd)) { c->map_check_error = -ENOENT; c->map_check_error_str = "osd dne"; + c->target.osd = -1; return RECALC_OP_TARGET_OSD_DNE; } if (osdmap->is_down(c->target_osd)) { c->map_check_error = -ENXIO; c->map_check_error_str = "osd down"; + c->target.osd = -1; return RECALC_OP_TARGET_OSD_DOWN; } c->target.osd = c->target_osd; @@ -4734,10 +4736,12 @@ int Objecter::_calc_command_target(CommandOp *c, shunique_lock& sul) if (ret == RECALC_OP_TARGET_POOL_DNE) { c->map_check_error = -ENOENT; c->map_check_error_str = "pool dne"; + c->target.osd = -1; return ret; } else if (ret == RECALC_OP_TARGET_OSD_DOWN) { c->map_check_error = -ENXIO; c->map_check_error_str = "osd down"; + c->target.osd = -1; return ret; } }