When a bucket and object was "versioned", it was not possible to set swift
metadata on an existing object. In swift, it is possible to post metadata
(stored as extended attributes with specific names) on objects without
bumping the version on a versioned object. In ceph, objects in versioned
buckets *may* be versioned. Versioned objects have a "olh" (object logical
header) header which points to the versioned header which contains or points
to the current actual data for the object. Pre-existing logic here correctly
sets the attributes for non-versioned objects. For versioned ojbects it
incorrectly stored those attributes in the olh rather than in the versioned header.
The corrected logic here retains the target object name and stores the
attributes in the correct header for both cases rather than in the olh for
the versioned object.
Fixes: https://tracker.ceph.com/issues/37531 Signed-off-by: Marcus Watts <mwatts@redhat.com>