]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: when failing read from client, return correct error
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 3 Sep 2013 20:27:21 +0000 (13:27 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Sun, 3 Nov 2013 01:28:06 +0000 (18:28 -0700)
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)

src/rgw/rgw_rest.cc

index 196bd29e99b27484dae0020265dc007717225a16..4aa1d40121108f15b43fa84662c8c0ca3521bf2a 100644 (file)
@@ -709,7 +709,7 @@ int RGWPutObj_ObjStore::get_data(bufferlist& bl)
     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);
   }