From 4337a313cddd31190e61f60c31f52d0a7d29e3d7 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 15 Dec 2020 12:06:24 -0500 Subject: [PATCH] rgw: remove unused attrs from RGWBucketReshard Signed-off-by: Casey Bodley --- src/rgw/rgw_admin.cc | 7 +++---- src/rgw/rgw_reshard.cc | 8 +++----- src/rgw/rgw_reshard.h | 2 -- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 0e457d6cf619a..f2c605eeed8ad 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -7148,7 +7148,7 @@ next: return ret; } - RGWBucketReshard br(static_cast(store), bucket->get_info(), bucket->get_attrs(), nullptr /* no callback */); + RGWBucketReshard br(static_cast(store), bucket->get_info(), nullptr /* no callback */); #define DEFAULT_RESHARD_MAX_ENTRIES 1000 if (max_entries < 1) { @@ -7246,7 +7246,7 @@ next: return -ret; } - RGWBucketReshard br(static_cast(store), bucket->get_info(), bucket->get_attrs(), nullptr /* no callback */); + RGWBucketReshard br(static_cast(store), bucket->get_info(), nullptr /* no callback */); list status; int r = br.get_status(dpp(), &status); if (r < 0) { @@ -7289,8 +7289,7 @@ next: if (bucket_initable) { // we did not encounter an error, so let's work with the bucket - RGWBucketReshard br(static_cast(store), bucket->get_info(), bucket->get_attrs(), - nullptr /* no callback */); + RGWBucketReshard br(static_cast(store), bucket->get_info(), nullptr /* no callback */); int ret = br.cancel(dpp()); if (ret < 0) { if (ret == -EBUSY) { diff --git a/src/rgw/rgw_reshard.cc b/src/rgw/rgw_reshard.cc index af5e7009acffb..638602ab3a33c 100644 --- a/src/rgw/rgw_reshard.cc +++ b/src/rgw/rgw_reshard.cc @@ -253,9 +253,8 @@ public: RGWBucketReshard::RGWBucketReshard(rgw::sal::RadosStore* _store, const RGWBucketInfo& _bucket_info, - const map& _bucket_attrs, RGWBucketReshardLock* _outer_reshard_lock) : - store(_store), bucket_info(_bucket_info), bucket_attrs(_bucket_attrs), + store(_store), bucket_info(_bucket_info), reshard_lock(store, bucket_info, true), outer_reshard_lock(_outer_reshard_lock) { } @@ -1003,12 +1002,11 @@ int RGWReshard::process_single_logshard(int logshard_num, const DoutPrefixProvid rgw_bucket bucket; RGWBucketInfo bucket_info; - map attrs; ret = store->getRados()->get_bucket_info(store->svc(), entry.tenant, entry.bucket_name, bucket_info, nullptr, - null_yield, dpp, &attrs); + null_yield, dpp, nullptr); if (ret < 0 || bucket_info.bucket.bucket_id != entry.bucket_id) { if (ret < 0) { ldpp_dout(dpp, 0) << __func__ << @@ -1044,7 +1042,7 @@ int RGWReshard::process_single_logshard(int logshard_num, const DoutPrefixProvid } { - RGWBucketReshard br(store, bucket_info, attrs, nullptr); + RGWBucketReshard br(store, bucket_info, nullptr); FaultInjector f; ret = br.execute(entry.new_num_shards, f, max_entries, dpp, diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h index 2bba9a3690210..2594ae295bc3c 100644 --- a/src/rgw/rgw_reshard.h +++ b/src/rgw/rgw_reshard.h @@ -76,7 +76,6 @@ private: rgw::sal::RadosStore* store; RGWBucketInfo bucket_info; - std::map bucket_attrs; rgw::bucket_index_layout_generation prev_index; RGWBucketReshardLock reshard_lock; @@ -101,7 +100,6 @@ public: // manage RGWBucketReshard(rgw::sal::RadosStore* _store, const RGWBucketInfo& _bucket_info, - const std::map& _bucket_attrs, RGWBucketReshardLock* _outer_reshard_lock); int execute(int num_shards, FaultInjector& f, int max_op_entries, const DoutPrefixProvider *dpp, -- 2.39.5