summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-06-22 23:26:55 -0700
committerYehuda Sadeh <yehuda@inktank.com>2013-06-22 23:26:55 -0700
commit5f43fa8140dc1c6d7cd0ac7502d30777f0728e89 (patch)
treeab5781c285465ed6618596f8e75f51cf1ca6fcab
parentd7af5e144cace6fcb821e44eddd13648a113612b (diff)
downloadceph-5f43fa8140dc1c6d7cd0ac7502d30777f0728e89.tar.gz
rgw: fix broken obj put
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/rgw/rgw_rados.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index c8ecb413976..3ccb083e71b 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -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);