diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:44 +0000 |
commit | 17d6a993fc17d533460c5f40f3908c708e057c18 (patch) | |
tree | 1a3bd93e0ecd74fa02f93a528fe2f87e5314c4b5 /src/rgw/driver/rados/rgw_sal_rados.cc | |
parent | Releasing progress-linux version 18.2.2-0progress7.99u1. (diff) | |
download | ceph-17d6a993fc17d533460c5f40f3908c708e057c18.tar.xz ceph-17d6a993fc17d533460c5f40f3908c708e057c18.zip |
Merging upstream version 18.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/rgw/driver/rados/rgw_sal_rados.cc')
-rw-r--r-- | src/rgw/driver/rados/rgw_sal_rados.cc | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/src/rgw/driver/rados/rgw_sal_rados.cc b/src/rgw/driver/rados/rgw_sal_rados.cc index 9acdb79d3..414f44bb8 100644 --- a/src/rgw/driver/rados/rgw_sal_rados.cc +++ b/src/rgw/driver/rados/rgw_sal_rados.cc @@ -1972,9 +1972,11 @@ int RadosObject::transition(Bucket* bucket, const real_time& mtime, uint64_t olh_epoch, const DoutPrefixProvider* dpp, - optional_yield y) + optional_yield y, + uint32_t flags) { - return store->getRados()->transition_obj(*rados_ctx, bucket->get_info(), get_obj(), placement_rule, mtime, olh_epoch, dpp, y); + return store->getRados()->transition_obj(*rados_ctx, bucket->get_info(), get_obj(), placement_rule, + mtime, olh_epoch, dpp, y, flags & FLAG_LOG_OP); } int RadosObject::transition_to_cloud(Bucket* bucket, @@ -2253,7 +2255,7 @@ RadosObject::RadosDeleteOp::RadosDeleteOp(RadosObject *_source) : parent_op(&op_target) { } -int RadosObject::RadosDeleteOp::delete_obj(const DoutPrefixProvider* dpp, optional_yield y) +int RadosObject::RadosDeleteOp::delete_obj(const DoutPrefixProvider* dpp, optional_yield y, uint32_t flags) { parent_op.params.bucket_owner = params.bucket_owner.get_id(); parent_op.params.versioning_status = params.versioning_status; @@ -2270,7 +2272,7 @@ int RadosObject::RadosDeleteOp::delete_obj(const DoutPrefixProvider* dpp, option parent_op.params.abortmp = params.abortmp; parent_op.params.parts_accounted_size = params.parts_accounted_size; - int ret = parent_op.delete_obj(y, dpp); + int ret = parent_op.delete_obj(y, dpp, flags & FLAG_LOG_OP); if (ret < 0) return ret; @@ -2282,15 +2284,16 @@ int RadosObject::RadosDeleteOp::delete_obj(const DoutPrefixProvider* dpp, option int RadosObject::delete_object(const DoutPrefixProvider* dpp, optional_yield y, - bool prevent_versioning) + uint32_t flags) { RGWRados::Object del_target(store->getRados(), bucket->get_info(), *rados_ctx, get_obj()); RGWRados::Object::Delete del_op(&del_target); del_op.params.bucket_owner = bucket->get_info().owner; - del_op.params.versioning_status = prevent_versioning ? 0 : bucket->get_info().versioning_status(); + del_op.params.versioning_status = (flags & FLAG_PREVENT_VERSIONING) + ? 0 : bucket->get_info().versioning_status(); - return del_op.delete_obj(y, dpp); + return del_op.delete_obj(y, dpp, flags & FLAG_LOG_OP); } int RadosObject::delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate, @@ -2459,7 +2462,7 @@ int RadosMultipartUpload::abort(const DoutPrefixProvider *dpp, CephContext *cct) std::unique_ptr<rgw::sal::Object> obj = bucket->get_object( rgw_obj_key(obj_part->oid, std::string(), RGW_OBJ_NS_MULTIPART)); obj->set_hash_source(mp_obj.get_key()); - ret = obj->delete_object(dpp, null_yield); + ret = obj->delete_object(dpp, null_yield, 0); if (ret < 0 && ret != -ENOENT) return ret; } else { @@ -2509,7 +2512,7 @@ int RadosMultipartUpload::abort(const DoutPrefixProvider *dpp, CephContext *cct) del_op->params.parts_accounted_size = parts_accounted_size; // and also remove the metadata obj - ret = del_op->delete_obj(dpp, null_yield); + ret = del_op->delete_obj(dpp, null_yield, 0); if (ret < 0) { ldpp_dout(dpp, 20) << __func__ << ": del_op.delete_obj returned " << ret << dendl; @@ -2694,7 +2697,7 @@ int RadosMultipartUpload::complete(const DoutPrefixProvider *dpp, int marker = 0; uint64_t min_part_size = cct->_conf->rgw_multipart_min_part_size; auto etags_iter = part_etags.begin(); - rgw::sal::Attrs attrs = target_obj->get_attrs(); + rgw::sal::Attrs& attrs = target_obj->get_attrs(); do { ret = list_parts(dpp, cct, max_parts, marker, &marker, &truncated); @@ -3120,10 +3123,11 @@ int RadosAtomicWriter::complete(size_t accounted_size, const std::string& etag, const char *if_match, const char *if_nomatch, const std::string *user_data, rgw_zone_set *zones_trace, bool *canceled, - optional_yield y) + optional_yield y, + uint32_t flags) { return processor.complete(accounted_size, etag, mtime, set_mtime, attrs, delete_at, - if_match, if_nomatch, user_data, zones_trace, canceled, y); + if_match, if_nomatch, user_data, zones_trace, canceled, y, flags); } int RadosAppendWriter::prepare(optional_yield y) @@ -3143,10 +3147,11 @@ int RadosAppendWriter::complete(size_t accounted_size, const std::string& etag, const char *if_match, const char *if_nomatch, const std::string *user_data, rgw_zone_set *zones_trace, bool *canceled, - optional_yield y) + optional_yield y, + uint32_t flags) { return processor.complete(accounted_size, etag, mtime, set_mtime, attrs, delete_at, - if_match, if_nomatch, user_data, zones_trace, canceled, y); + if_match, if_nomatch, user_data, zones_trace, canceled, y, flags); } int RadosMultipartWriter::prepare(optional_yield y) @@ -3166,10 +3171,11 @@ int RadosMultipartWriter::complete(size_t accounted_size, const std::string& eta const char *if_match, const char *if_nomatch, const std::string *user_data, rgw_zone_set *zones_trace, bool *canceled, - optional_yield y) + optional_yield y, + uint32_t flags) { return processor.complete(accounted_size, etag, mtime, set_mtime, attrs, delete_at, - if_match, if_nomatch, user_data, zones_trace, canceled, y); + if_match, if_nomatch, user_data, zones_trace, canceled, y, flags); } const std::string& RadosZoneGroup::get_endpoint() const @@ -3331,7 +3337,7 @@ const std::string_view RadosZone::get_tier_type() if (local_zone) return store->svc()->zone->get_zone().tier_type; - return rgw_zone.id; + return rgw_zone.tier_type; } RGWBucketSyncPolicyHandlerRef RadosZone::get_sync_policy_handler() |