]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: bucket link: use data from bucket_info to rewrite bucket_endpoint.
authorMarcus Watts <mwatts@redhat.com>
Sat, 25 Aug 2018 09:48:41 +0000 (05:48 -0400)
committerShilpa Jagannath <smanjara@redhat.com>
Tue, 30 Jul 2019 08:30:45 +0000 (14:00 +0530)
commit190f2935505dd504ee2c33d9966e84020d17faa0
tree07608d97c0d8d822b51f6783403fde216a9e5347
parent31f01da633bad327502558db59b7caf57d4fefe5
rgw: bucket link: use data from bucket_info to rewrite bucket_endpoint.

The bucket link command was doing a fetch of the entrypoint late
in the link process.  This makes it harder to do "bucket move"
functionality, because then it would need to know the old
bucket late in the process.  The bucketinfo structure has
all the data elements necessary to recreate the endpoint,
so the changes here arrange to just use that data.

In order to write the object it's also necessary to propagate
xattrs.  The only xattr that seems to be present on the endpoint
is "ceph.objclass.version", so that's what this copies out.
It appears that attribute may be set set separately by cls,
so I'm not sure this is actually necessary.  However, the
old code would have written it, so this code preserves
that behavior.

Fixes: http://tracker.ceph.com/issues/35885
Signed-off-by: Marcus Watts <mwatts@redhat.com>
src/rgw/rgw_bucket.cc
src/rgw/rgw_bucket.h