]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: implement rgw_setattr
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 14 Apr 2016 23:18:37 +0000 (19:18 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Wed, 5 Oct 2016 18:26:03 +0000 (14:26 -0400)
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
src/rgw/rgw_file.cc

index b24060b39c8448e39cd3e6590671fc8b66a83d9d..bb470c5475a05943e2ff03028c1dcef2b0ea945f 100644 (file)
@@ -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);