]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix rados bucket merge and store attrs
authorlightmelodies <lightmelodies@outlook.com>
Fri, 15 Sep 2023 03:25:02 +0000 (03:25 +0000)
committerCasey Bodley <cbodley@redhat.com>
Tue, 25 Feb 2025 16:44:42 +0000 (11:44 -0500)
The original code pass `new_attrs` as argument, which will overwrite existing attrs.
(e.g. set bucket ratelimit will break all bucket policy and acl settings)

Signed-off-by: Wei Wang <lightmelodies@outlook.com>
(cherry picked from commit eafe4ac81b787a2573b16036ac987822cbe0161c)

src/rgw/driver/rados/rgw_sal_rados.cc

index 3e9f9070296c763dbb805044cd4ee63abe39c2f3..0a70ed1c47e9cf9fdf38927264ce9faf7054463d 100644 (file)
@@ -718,7 +718,7 @@ int RadosBucket::merge_and_store_attrs(const DoutPrefixProvider* dpp, Attrs& new
          attrs[it.first] = it.second;
   }
   return store->ctl()->bucket->set_bucket_instance_attrs(get_info(),
-                               new_attrs, &get_info().objv_tracker, y, dpp);
+                               attrs, &get_info().objv_tracker, y, dpp);
 }
 
 int RadosBucket::try_refresh_info(const DoutPrefixProvider* dpp, ceph::real_time* pmtime, optional_yield y)