]> git.apps.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)
committerNathan Cutler <ncutler@suse.com>
Mon, 14 Oct 2019 11:37:05 +0000 (13:37 +0200)
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>
(cherry picked from commit 7d32b082f826181b605ae02ebc914fba9ac0d449)

Conflicts:
src/rgw/rgw_rados.cc

src/rgw/rgw_rados.cc

index 94b316482d339193a7ee3dd0bd1660bcf5e69c82..402715d9b45c681cd6adb0e1ad4ae4307c18cfc3 100644 (file)
@@ -10190,9 +10190,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;