rgw/rados: RadosReadOp::prepare only updates object instance

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>
This commit is contained in:
Casey Bodley 2023-02-20 17:27:28 -05:00
parent 01d8b4c38b
commit 6fc57159ef

View File

@ -1955,7 +1955,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;