]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: use correct oid when creating gc chains
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 23 Apr 2015 22:33:03 +0000 (15:33 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Wed, 24 Jun 2015 16:41:21 +0000 (10:41 -0600)
Fixes: #11447
Backport: hammer

When creating gc chain, use the appropriate oid, otherwise objects will
leak.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit cc5d34678c6d4bdcd552e6334a383c4df9797f46)

src/rgw/rgw_rados.cc

index 54a76e827980873b987ad0ca47b8691289370fd9..c135318b6eead05a06bff28ddedd96a22c9579bb 100644 (file)
@@ -4171,7 +4171,7 @@ void RGWRados::update_gc_chain(rgw_obj& head_obj, RGWObjManifest& manifest, cls_
     string oid, loc;
     rgw_bucket bucket;
     get_obj_bucket_and_oid_loc(mobj, bucket, oid, loc);
-    cls_rgw_obj_key key(head_obj.get_index_key_name(), head_obj.get_instance());
+    cls_rgw_obj_key key(oid);
     chain->push_obj(bucket.data_pool, key, loc);
   }
 }