]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: set s->obj_size from bytes_written 18571/head
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 26 Oct 2017 22:28:10 +0000 (18:28 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Thu, 26 Oct 2017 23:23:09 +0000 (19:23 -0400)
Required to store correct final accounted_size of objects in
RGWWriteWriteRequest::write_finish.

Fixes: http://tracker.ceph.com/issues/21940
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_file.cc

index 084cab7e988950dfe51b55816551ec978f864970..1c0d1c75b39dc44db1c67ee312527a06a86f3d63 100644 (file)
@@ -1425,7 +1425,7 @@ namespace rgw {
     struct timespec omtime = rgw_fh->get_mtime();
     real_time appx_t = real_clock::now();
 
-    s->obj_size = ofs; // XXX check ofs
+    s->obj_size = bytes_written;
     perfcounter->inc(l_rgw_put_b, s->obj_size);
 
     op_ret = get_store()->check_quota(s->bucket_owner.get_id(), s->bucket,
@@ -1434,7 +1434,8 @@ namespace rgw {
       goto done;
     }
 
-    op_ret = get_store()->check_bucket_shards(s->bucket_info, s->bucket, bucket_quota);
+    op_ret = get_store()->check_bucket_shards(s->bucket_info, s->bucket,
+                                             bucket_quota);
     if (op_ret < 0) {
       goto done;
     }