diff options
author | Casey Bodley <cbodley@users.noreply.github.com> | 2024-02-16 15:59:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-16 15:59:31 +0100 |
commit | 737a3f98e4189b56815e80e2f51e3878cc531ccc (patch) | |
tree | f1043a43b2285bd817baf9ecd3205323602e14a2 | |
parent | Merge pull request #55453 from ronen-fr/wip-rf-0741-logs (diff) | |
parent | rgw/putobj: RadosWriter uses part head object for multipart parts (diff) | |
download | ceph-737a3f98e4189b56815e80e2f51e3878cc531ccc.tar.xz ceph-737a3f98e4189b56815e80e2f51e3878cc531ccc.zip |
Merge pull request #55582 from cbodley/wip-63642
rgw/putobj: RadosWriter uses part head object for multipart parts
Reviewed-by: Mark Kogan <mkogan@ibm.com>
Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
-rw-r--r-- | src/rgw/driver/rados/rgw_putobj_processor.cc | 8 | ||||
-rw-r--r-- | src/rgw/driver/rados/rgw_putobj_processor.h | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/rgw/driver/rados/rgw_putobj_processor.cc b/src/rgw/driver/rados/rgw_putobj_processor.cc index d7462587c87..846e2323caf 100644 --- a/src/rgw/driver/rados/rgw_putobj_processor.cc +++ b/src/rgw/driver/rados/rgw_putobj_processor.cc @@ -124,6 +124,11 @@ void RadosWriter::add_write_hint(librados::ObjectWriteOperation& op) { op.set_alloc_hint2(0, 0, alloc_hint_flags); } +void RadosWriter::set_head_obj(const rgw_obj& head) +{ + head_obj = head; +} + int RadosWriter::set_stripe_obj(const rgw_raw_obj& raw_obj) { return rgw_get_rados_ref(dpp, store->get_rados_handle(), raw_obj, @@ -458,6 +463,9 @@ int MultipartObjectProcessor::prepare_head() RGWSI_Tier_RADOS::raw_obj_to_obj(head_obj.bucket, stripe_obj, &head_obj); head_obj.index_hash_source = target_obj.key.name; + // point part uploads at the part head instead of the final multipart head + writer.set_head_obj(head_obj); + r = writer.set_stripe_obj(stripe_obj); if (r < 0) { return r; diff --git a/src/rgw/driver/rados/rgw_putobj_processor.h b/src/rgw/driver/rados/rgw_putobj_processor.h index 53b14c41ee0..17388f3fbaf 100644 --- a/src/rgw/driver/rados/rgw_putobj_processor.h +++ b/src/rgw/driver/rados/rgw_putobj_processor.h @@ -68,7 +68,7 @@ class RadosWriter : public rgw::sal::DataProcessor { RGWRados *const store; const RGWBucketInfo& bucket_info; RGWObjectCtx& obj_ctx; - const rgw_obj head_obj; + rgw_obj head_obj; rgw_rados_ref stripe_obj; // current stripe object RawObjSet written; // set of written objects for deletion const DoutPrefixProvider *dpp; @@ -87,6 +87,9 @@ class RadosWriter : public rgw::sal::DataProcessor { // add alloc hint to osd void add_write_hint(librados::ObjectWriteOperation& op); + // change the head object + void set_head_obj(const rgw_obj& head); + // change the current stripe object int set_stripe_obj(const rgw_raw_obj& obj); |