]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix 'bucket rm --bypass-gc' for copied objects 65772/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 3 Oct 2025 16:24:18 +0000 (12:24 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 3 Oct 2025 16:47:04 +0000 (12:47 -0400)
commit1fba459071da9f7ec13defe2c666f0df8174c8da
tree43dbccc4fac3e22d4b616d669079d03c3d0ad590
parent04f07e01e64b477e16e3d24b9847943e1b59d0d3
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>
src/rgw/driver/rados/rgw_rados.cc
src/rgw/driver/rados/rgw_rados.h
src/rgw/driver/rados/rgw_sal_rados.cc