]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw_file: fixup attrs across renames 8563/head
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 13 Apr 2016 23:46:25 +0000 (19:46 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Wed, 13 Apr 2016 23:46:25 +0000 (19:46 -0400)
commita353eaca6111b77fc92644b6dbaa38e506cb697d
tree57dff2c8391f0004b265aa9a3f2a714194ad0af1
parentb6297a704b62e5477c3539197a5af7da637f0cb7
rgw_file: fixup attrs across renames

Once Unix attributes were materialized as RGW object/bucket
attributes, it became possible to verify the serialized bucket and
object hashes with the expected values (based on the file-type
invariant path to the object).

Prior to this change, we saved the serialized hash values with the
rest of the Unix attrs, in RGW_ATTR_UNIX1.  Unfortunately, these
values were invalidated by rename operations.  To address this problem,
and to faciliate future operations on objects by their hashed ids,
the id hashes have been moved into their own RGW attr
RGW_ATTR_UNIX_KEY1.  This should allow more efficient search by, but
more importantly to the invalidation problem, allows us to use the
ATTRSMOD_MERGE behavior in RGWCopyObj to get copy offload while still
fixing up the object id.

The code at this commit doesn't use the serialized unix_mode value as
the outgoing st.st_mode result for rgw_getattr operations, pending a
bugfix for Ganesha's expected value range.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_common.h
src/rgw/rgw_file.cc
src/rgw/rgw_file.h