Skip to content

rgw: fix 'bucket rm --bypass-gc' for copied objects#65772

Merged
cbodley merged 1 commit intoceph:mainfrom
cbodley:wip-73348
Oct 21, 2025
Merged

rgw: fix 'bucket rm --bypass-gc' for copied objects#65772
cbodley merged 1 commit intoceph:mainfrom
cbodley:wip-73348

Conversation

@cbodley
Copy link
Contributor

@cbodley cbodley commented Oct 3, 2025

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

Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

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>
@cbodley cbodley requested a review from a team as a code owner October 3, 2025 16:47
@cbodley cbodley added the bug-fix label Oct 3, 2025
@github-actions github-actions bot added the rgw label Oct 3, 2025
Copy link
Member

@ivancich ivancich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes! Thanks, @cbodley !

@cbodley
Copy link
Contributor Author

cbodley commented Oct 15, 2025

jenkins test make check arm64

@cbodley
Copy link
Contributor Author

cbodley commented Oct 17, 2025

jenkins test make check arm64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants