]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix 'bucket rm --bypass-gc' for copied objects 66003/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 3 Oct 2025 16:24:18 +0000 (12:24 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 20 Nov 2025 15:53:45 +0000 (10:53 -0500)
commit83e895a02fff83fbb476ec97048e763b08a8bc48
tree96028c8ddbb1a122a512bd1b3d487add0dd41d62
parente12b37022a3f9ac7e4c47ed0afe62a90f4fae8e8
rgw: fix 'bucket rm --bypass-gc' for copied objects

the `--bypass-gc` argument to `radosgw-admin bucket rm` causes us to
call `RadosBucket::remove_bypass_gc()`, which loops over the tail
objects and removes each with `RGWRados::delete_raw_obj_aio()`

however, this was removing the objects with `cls_rgw_remove_obj()`,
which is for head objects, not tails. tail objects must be removed with
`cls_refcount_put()`, which preserves them until the last copy is
removed

rename `delete_raw_obj_aio()` to `delete_tail_obj_aio()` to clarify its
purpose

Fixes: https://tracker.ceph.com/issues/73348
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 1fba459071da9f7ec13defe2c666f0df8174c8da)
src/rgw/driver/rados/rgw_rados.cc
src/rgw/driver/rados/rgw_rados.h
src/rgw/driver/rados/rgw_sal_rados.cc