]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rados: RadosReadOp::prepare only updates object instance
authorCasey Bodley <cbodley@redhat.com>
Mon, 20 Feb 2023 22:27:28 +0000 (17:27 -0500)
committerCasey Bodley <cbodley@redhat.com>
Thu, 27 Mar 2025 19:50:51 +0000 (15:50 -0400)
when called on a versioned object, prepare() may follow olh and look up
a different object instance

but when called on a multipart part, we should not overwrite the
original object name with the part's object name (of the form
mymultipart.2~_XLFNqOW0NuiALg7q4-Hi_7hdtAkZUH.1)

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

src/rgw/driver/rados/rgw_sal_rados.cc

index ab3d0c4263902b76afcdbb42de750fc367dc28c0..4150e710479798618179b26623abfe9212abf2b5 100644 (file)
@@ -2230,7 +2230,7 @@ int RadosObject::RadosReadOp::prepare(optional_yield y, const DoutPrefixProvider
   if (ret < 0)
     return ret;
 
-  source->set_key(parent_op.state.obj.key);
+  source->set_instance(parent_op.state.obj.key.instance);
   source->set_obj_size(obj_size);
 
   return ret;