osd: ReplicatedPG::do_op: error on read-from-lost

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
This commit is contained in:
Colin Patrick McCabe 2010-11-23 21:45:47 -08:00
parent 136dfdeb70
commit ad4e5f36d4

View File

@ -265,6 +265,12 @@ void ReplicatedPG::do_op(MOSDOp *op)
osd->reply_op_error(op, r);
return;
}
if ((op->may_read()) && (obc->obs.oi.lost)) {
// This object is lost. Reading from it returns an error.
osd->reply_op_error(op, -ENFILE);
return;
}
bool ok;
dout(10) << "do_op mode is " << mode << dendl;