objecter: warn when OSD returns mismatched op vector

The osd shouldn't do this (even though we should tolerate it).

Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
This commit is contained in:
Sage Weil 2012-01-27 10:40:14 -08:00
parent 0cc26a94c8
commit 6453123cfa

View File

@ -1177,6 +1177,12 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
// per-op result demuxing
vector<OSDOp> out_ops;
m->claim_ops(out_ops);
if (out_ops.size() != op->ops.size())
ldout(cct, 0) << "WARNING: tid " << op->tid << " reply ops " << out_ops
<< " != request ops " << op->ops
<< " from " << m->get_source_inst() << dendl;
vector<bufferlist*>::iterator pb = op->out_bl.begin();
vector<int*>::iterator pr = op->out_rval.begin();
vector<Context*>::iterator ph = op->out_handler.begin();