- get rid of the helper function that adds the 'deleted' log layout.
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
* bucket: the name of the bucket to delete
* Returns 0 on success, -ERR# otherwise.
*/
-int RGWRados::delete_bucket(RGWBucketInfo& bucket_info, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp, bool check_empty)
+int RGWRados::delete_bucket(RGWBucketInfo& bucket_info, std::map<std::string, bufferlist>& attrs, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp, bool check_empty)
{
const rgw_bucket& bucket = bucket_info.bucket;
librados::IoCtx index_pool;
cct->_conf->rgw_bucket_index_max_aio)();
} else {
bucket_info.flags |= BUCKET_DELETED;
- map<string, bufferlist> attrs;
r = ctl.bucket->store_bucket_instance_info(bucket, bucket_info, y, dpp, RGWBucketCtl::BucketInstance::PutParams()
.set_exclusive(false)
* bucket: the name of the bucket to delete
* Returns 0 on success, -ERR# otherwise.
*/
- int delete_bucket(RGWBucketInfo& bucket_info, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp, bool check_empty = true);
+ int delete_bucket(RGWBucketInfo& bucket_info, std::map<std::string, bufferlist>& attrs, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp, bool check_empty = true);
void wakeup_meta_sync_shards(std::set<int>& shard_ids);
RGWObjVersionTracker ot;
// if we deleted children above we will force delete, as any that
- // remain is detritus from a prior bug
- ret = store->getRados()->delete_bucket(info, ot, y, dpp, !delete_children);
+ // remain is detrius from a prior bug
+ ret = store->getRados()->delete_bucket(info, get_attrs(), ot, y, dpp, !delete_children);
if (ret < 0) {
ldpp_dout(dpp, -1) << "ERROR: could not remove bucket " <<
info.bucket.name << dendl;
return [gen] (const bucket_log_layout_generation& l) { return l.gen == gen; };
}
-inline bucket_log_layout_generation log_layout_from_deleted_index(
- uint64_t gen, const bucket_index_layout_generation& index)
-{
- return {gen, {BucketLogType::Deleted, {index.gen, index.layout.normal}}};
-}
-
inline bucket_index_layout_generation log_to_index_layout(const bucket_log_layout_generation& log_layout)
{
ceph_assert(log_layout.layout.type == BucketLogType::InIndex);