]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rados: remove get_obj_state() overload for follow_olh=true
authorCasey Bodley <cbodley@redhat.com>
Mon, 20 Feb 2023 13:06:52 +0000 (08:06 -0500)
committerCasey Bodley <cbodley@redhat.com>
Thu, 27 Mar 2025 18:03:14 +0000 (14:03 -0400)
and just add the follow_olh=true argument to callers

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 60dadf3c8d56eea2a6b2074599404fa74345bcc8)

Conflicts:
src/rgw/driver/rados/rgw_rados.cc obj_ctx -> src_obj_ctx

src/rgw/driver/rados/rgw_putobj_processor.cc
src/rgw/driver/rados/rgw_rados.cc
src/rgw/driver/rados/rgw_rados.h

index 712cb311b68ab883b651be12393b1bcbc89836de..fc0782939db161abf61f122ec3e84c583c3d53cc 100644 (file)
@@ -610,9 +610,10 @@ int AppendObjectProcessor::process_first_chunk(bufferlist &&data, rgw::sal::Data
 
 int AppendObjectProcessor::prepare(optional_yield y)
 {
-  RGWObjState *astate;
+  RGWObjState *astate = nullptr;
+  constexpr bool follow_olh = true;
   int r = store->get_obj_state(dpp, &obj_ctx, bucket_info, head_obj,
-                               &astate, &cur_manifest, y);
+                               &astate, &cur_manifest, follow_olh, y);
   if (r < 0) {
     return r;
   }
index 0f276ed6e97b28f7322513560aea99b9f6c7d75a..043fb2c01f9ee2de6e0e45a51fe31875b6d7a1d3 100644 (file)
@@ -4445,7 +4445,9 @@ int RGWRados::copy_obj(RGWObjectCtx& src_obj_ctx,
   RGWObjState *astate = NULL;
   RGWObjManifest *amanifest = nullptr;
 
-  ret = get_obj_state(dpp, &src_obj_ctx, src_bucket_info, src_obj, &astate, &amanifest, y);
+  constexpr bool follow_olh = true;
+  ret = get_obj_state(dpp, &src_obj_ctx, src_bucket_info, src_obj,
+                      &astate, &amanifest, follow_olh, y);
   if (ret < 0) {
     return ret;
   }
index 146eac2de588a2b2dcc0510df2d1579149289c01..3ad3edef8958124aa07b2f0a45366bc72d290f16 100644 (file)
@@ -1268,11 +1268,11 @@ public:
                         optional_yield y,
                         ceph::real_time set_mtime = ceph::real_clock::zero());
 
-  int get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state, RGWObjManifest** manifest,
-                    bool follow_olh, optional_yield y, bool assume_noent = false);
-  int get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state, RGWObjManifest** manifest, optional_yield y) {
-    return get_obj_state(dpp, rctx, bucket_info, obj, state, manifest, true, y);
-  }
+  int get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx,
+                    RGWBucketInfo& bucket_info, const rgw_obj& obj,
+                    RGWObjState** pstate, RGWObjManifest** pmanifest,
+                    bool follow_olh, optional_yield y,
+                    bool assume_noent = false);
 
   using iterate_obj_cb = int (*)(const DoutPrefixProvider*, const rgw_raw_obj&, off_t, off_t,
                                  off_t, bool, RGWObjState*, void*);