Fixes: #6214
When getting a failed read from client when putting an object
we returned the wrong value (always 0), which in the chunked-
upload case ended up in assuming that the write was done
successfully.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit
0499948aad64c6c66668b43963403fb0cb1a2737)
int r = s->cio->read(bp.c_str(), cl, &read_len);
len = read_len;
if (r < 0)
- return ret;
+ return r;
bl.append(bp, 0, len);
}