]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix broken obj put
authorYehuda Sadeh <yehuda@inktank.com>
Sun, 23 Jun 2013 06:26:55 +0000 (23:26 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Sun, 23 Jun 2013 06:26:55 +0000 (23:26 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_rados.cc

index c8ecb41397604c21e785a7fbc02929a37034fd04..3ccb083e71bea50f79c53ec37430db464e0626bd 100644 (file)
@@ -735,6 +735,10 @@ void RGWPutObjProcessor_Atomic::complete_parts()
 
 int RGWPutObjProcessor_Atomic::do_complete(string& etag, time_t *mtime, time_t set_mtime, map<string, bufferlist>& attrs)
 {
+  if (!data_ofs && !immutable_head()) {
+    first_chunk.claim(pending_data_bl);
+    obj_len = (uint64_t)first_chunk.length();
+  }
   if (pending_data_bl.length()) {
     void *handle;
     int r = write_data(pending_data_bl, data_ofs, &handle);