From 0de33909012f2a8305ff2038906669c78070cbcd Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Thu, 14 Apr 2016 19:18:37 -0400 Subject: [PATCH] rgw_file: implement rgw_setattr 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 (cherry picked from commit 4de1c3c260265f821ebee842d49cb35bf49d8e4e) Fixes: http://tracker.ceph.com/issues/17311 Fixes: http://tracker.ceph.com/issues/17332 --- src/rgw/rgw_file.cc | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/rgw/rgw_file.cc b/src/rgw/rgw_file.cc index b24060b39c844..bb470c5475a05 100644 --- a/src/rgw/rgw_file.cc +++ b/src/rgw/rgw_file.cc @@ -584,18 +584,6 @@ namespace rgw { { 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); -- 2.39.5