From c7157a655fe42b593f9a29e7734f2c494cbd6157 Mon Sep 17 00:00:00 2001 From: Shilpa Jagannath Date: Tue, 31 Mar 2020 16:43:12 +0530 Subject: [PATCH] Moved ostream operator overloading to BucketIndexType() to rgw_bucket_layout header file Signed-off-by: Shilpa Jagannath --- src/rgw/rgw_bucket_layout.h | 12 ++++++++++++ src/rgw/rgw_common.h | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/rgw/rgw_bucket_layout.h b/src/rgw/rgw_bucket_layout.h index 5f9d156c98c..69030d03016 100644 --- a/src/rgw/rgw_bucket_layout.h +++ b/src/rgw/rgw_bucket_layout.h @@ -30,6 +30,18 @@ enum class BucketHashType : uint8_t { Mod, // rjenkins hash of object name, modulo num_shards }; +inline std::ostream& operator<<(std::ostream& out, const rgw::BucketIndexType &index_type) +{ + switch (index_type) { + case rgw::BucketIndexType::Normal: + return out << "Normal"; + case rgw::BucketIndexType::Indexless: + return out << "Indexless"; + default: + return out << "Unknown"; + } +} + struct bucket_index_normal_layout { uint32_t num_shards = 1; diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index 4d6d866d98b..3dd53ddf234 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -1091,18 +1091,6 @@ enum RGWBucketFlags { BUCKET_OBJ_LOCK_ENABLED = 0X20, }; -inline ostream& operator<<(ostream& out, const rgw::BucketIndexType &index_type) -{ - switch (index_type) { - case rgw::BucketIndexType::Normal: - return out << "Normal"; - case rgw::BucketIndexType::Indexless: - return out << "Indexless"; - default: - return out << "Unknown"; - } -} - class RGWSI_Zone; struct RGWBucketInfo { -- 2.39.5