Merge pull request #1776 from ceph/wip-8289

rgw: cut short object read if a chunk returns error

Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2014-05-07 15:03:31 -07:00
commit 6a06f320c1

View File

@ -4839,8 +4839,16 @@ void RGWRados::get_obj_aio_completion_cb(completion_t c, void *arg)
ldout(cct, 20) << "get_obj_aio_completion_cb: io completion ofs=" << ofs << " len=" << len << dendl;
d->throttle.put(len);
if (d->is_cancelled())
r = rados_aio_get_return_value(c);
if (r < 0) {
ldout(cct, 0) << "ERROR: got unexpected error when trying to read object: " << r << dendl;
d->set_cancelled(r);
goto done;
}
if (d->is_cancelled()) {
goto done;
}
d->data_lock.Lock();