It'd be good to clean up parameter const-ness at some point. rgw_bucket in particular in this path could be const, but it should be fixed later since it requires pretty wide-ranging changes.