]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: make sure object's idtag is updated when available
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 29 Aug 2019 14:36:17 +0000 (10:36 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Thu, 29 Aug 2019 14:47:27 +0000 (10:47 -0400)
This change was originally submitted by lltlo <120680451@qq.com> but
had some formatting issues and wasn't signed-off.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/rgw/rgw_rados.cc

index 7389910588982d2734c429a13397b7db8f94c661..2b543d95b81dbffaa67f237833f884313a75db96 100644 (file)
@@ -5545,9 +5545,15 @@ int RGWRados::set_attrs(void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& sr
         state->attrset.erase(iter->first);
       }
     }
+
     for (iter = attrs.begin(); iter != attrs.end(); ++iter) {
       state->attrset[iter->first] = iter->second;
     }
+
+    auto iter = state->attrset.find(RGW_ATTR_ID_TAG);
+    if (iter != state->attrset.end()) {
+      iter->second = state->obj_tag;
+    }
   }
 
   return 0;