summaryrefslogtreecommitdiffstats
path: root/src/rgw/driver/rados/rgw_bucket.cc
diff options
context:
space:
mode:
authorYehuda Sadeh <ysadehwe@ibm.com>2024-11-26 16:07:36 +0100
committerYehuda Sadeh <ysadehwe@ibm.com>2024-11-26 16:11:28 +0100
commitb564084cbfa747be831f54e4be40c217efd189e0 (patch)
treea131030c58baeb4e1e832c64710c9072978195b4 /src/rgw/driver/rados/rgw_bucket.cc
parentMerge pull request #60554 from jshen28/fix-legacy-addr-mismatch (diff)
downloadceph-b564084cbfa747be831f54e4be40c217efd189e0.tar.xz
ceph-b564084cbfa747be831f54e4be40c217efd189e0.zip
rgw: fix bucket link operation
Allow linking unlinked bucket. Fixes: https://tracker.ceph.com/issues/69060 Signed-off-by: Yehuda Sadeh <ysadehwe@ibm.com>
Diffstat (limited to 'src/rgw/driver/rados/rgw_bucket.cc')
-rw-r--r--src/rgw/driver/rados/rgw_bucket.cc5
1 files changed, 3 insertions, 2 deletions
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);