Skip to content

Commit

Permalink
Merge pull request #11794 from rzarzynski/wip-rgw-17803
Browse files Browse the repository at this point in the history
rgw: fix uncompressed object size deduction in RGWRados::copy_obj_data.

Reviewed-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
cbodley committed Nov 7, 2016
2 parents c2a9480 + 5007dbb commit a50ede0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rgw/rgw_rados.cc
Expand Up @@ -7624,8 +7624,7 @@ int RGWRados::copy_obj_data(RGWObjectCtx& obj_ctx,
}
}

// pass original size if compressed
uint64_t accounted_size = ofs;
uint64_t accounted_size;
{
bool compressed{false};
RGWCompressionInfo cs_info;
Expand All @@ -7634,7 +7633,8 @@ int RGWRados::copy_obj_data(RGWObjectCtx& obj_ctx,
ldout(cct, 0) << "ERROR: failed to read compression info" << dendl;
return ret;
}
accounted_size = cs_info.orig_size;
// pass original size if compressed
accounted_size = compressed ? cs_info.orig_size : ofs;
}

return processor.complete(accounted_size, etag, mtime, set_mtime, attrs, delete_at);
Expand Down

0 comments on commit a50ede0

Please sign in to comment.