If we are waiting for an osdmap for a command, track that explicitly so
that we know when to retry send_command().
Signed-off-by: Sage Weil <sage@inktank.com>
uint64_t pending_tid = 0;
EntityName pending_target;
pg_t pending_target_pgid;
+bool cmd_waiting_for_osdmap = false;
vector<string> pending_cmd;
bufferlist pending_bl;
bool reply;
if (!osdmap) {
ctx->mc.sub_want("osdmap", 0, CEPH_SUBSCRIBE_ONETIME);
ctx->mc.renew_subs();
+ cmd_waiting_for_osdmap = true;
return;
}
}
delete osdmap;
osdmap = new OSDMap;
osdmap->decode(m->maps[e]);
- if (pending_cmd.size())
+ if (cmd_waiting_for_osdmap) {
+ cmd_waiting_for_osdmap = false;
send_command(ctx);
+ }
ctx->lock.Unlock();
m->put();
}