Introduce a new RGWSetattrs RGWOp descendant, to create or replace
sets of attrs on buckets or objects.
This version of the change uses the standard RGWRADOS::set_attrs op
(we want attribute changes to (e.g.) sync with other changes).
Previous versions of this changed incorrectly masked the values
of st->st_ino in RGWFileHandle::stat(), now fixed.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit
4de1c3c260265f821ebee842d49cb35bf49d8e4e)
Fixes: http://tracker.ceph.com/issues/17311
Fixes: http://tracker.ceph.com/issues/17332
{
int rc, rc2;
buffer::list ux_key, ux_attrs;
-
- switch(rgw_fh->fh.fh_type) {
- case RGW_FS_TYPE_FILE:
- {
- if (rgw_fh->deleted())
- return -ESTALE;
- }
- break;
- default:
- break;
- };
-
string obj_name{rgw_fh->relative_object_name()};
RGWSetAttrsRequest req(cct, get_user(), rgw_fh->bucket_name(), obj_name);