From b564084cbfa747be831f54e4be40c217efd189e0 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 26 Nov 2024 10:07:36 -0500 Subject: rgw: fix bucket link operation Allow linking unlinked bucket. Fixes: https://tracker.ceph.com/issues/69060 Signed-off-by: Yehuda Sadeh --- src/rgw/driver/rados/rgw_bucket.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/rgw/driver/rados/rgw_bucket.cc') diff --git a/src/rgw/driver/rados/rgw_bucket.cc b/src/rgw/driver/rados/rgw_bucket.cc index 21d238d3341..905f29fa5bd 100644 --- a/src/rgw/driver/rados/rgw_bucket.cc +++ b/src/rgw/driver/rados/rgw_bucket.cc @@ -169,7 +169,8 @@ int RGWBucket::init(rgw::sal::Driver* _driver, RGWBucketAdminOpState& op_state, driver = _driver; - std::string bucket_name = op_state.get_bucket_name(); + auto bucket_name = op_state.get_bucket_name(); + auto bucket_id = op_state.get_bucket_id(); if (bucket_name.empty() && op_state.get_user_id().empty()) return -EINVAL; @@ -184,7 +185,7 @@ int RGWBucket::init(rgw::sal::Driver* _driver, RGWBucketAdminOpState& op_state, bucket_name = bucket_name.substr(pos + 1); } - int r = driver->load_bucket(dpp, rgw_bucket(tenant, bucket_name), + int r = driver->load_bucket(dpp, rgw_bucket(tenant, bucket_name, bucket_id), &bucket, y); if (r < 0) { set_err_msg(err_msg, "failed to fetch bucket info for bucket=" + bucket_name); -- cgit v1.2.3