mirror of
https://github.com/ceph/ceph
synced 2025-01-03 09:32:43 +00:00
Merge pull request #3167 from ceph/wip-10307
rgw: use s->bucket_attrs instead of trying to read obj attrs Reviewed-by: Josh Durgin <jdurgin@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
f31020dac2
@ -1911,10 +1911,14 @@ void RGWPutMetadata::execute()
|
||||
/* no need to track object versioning, need it for bucket's data only */
|
||||
RGWObjVersionTracker *ptracker = (s->object ? NULL : &s->bucket_info.objv_tracker);
|
||||
|
||||
/* check if obj exists, read orig attrs */
|
||||
ret = get_obj_attrs(store, s, obj, orig_attrs, NULL, ptracker);
|
||||
if (ret < 0)
|
||||
return;
|
||||
if (s->object) {
|
||||
/* check if obj exists, read orig attrs */
|
||||
ret = get_obj_attrs(store, s, obj, orig_attrs, NULL, ptracker);
|
||||
if (ret < 0)
|
||||
return;
|
||||
} else {
|
||||
orig_attrs = s->bucket_attrs;
|
||||
}
|
||||
|
||||
if (!s->object && !placement_rule.empty()) {
|
||||
if (placement_rule != s->bucket_info.placement_rule) {
|
||||
|
Loading…
Reference in New Issue
Block a user